# LibTmux::Selection::Iterator::next

- **Module:** LibTmux::Selection
- **Package:** LibTmux
- **Language:** Perl
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-perl/blob/352715a4fa66a96eed7763b90daaa536aa2f121d/packages/core/lib/LibTmux/Selection/Iterator.pm#L4
- **Page:** https://libtmux.org/en/perl/latest/reference/libtmux-selection-iterator-next/

```
sub next($self)
```

Return the next captured entity or undef only at exhaustion. Order and multiplicity match creation-time membership. Later native selection edits do not change this traversal. A cursor is consumable; create a fresh cursor with [`"iterator" in LibTmux::Selection`](/en/perl/latest/reference/libtmux-selection-iterator-2bn1/) to traverse again. No tmux I/O occurs.

## Methods
