in reply to How to jump to open the next file in the same folder?

Ok, so it's overkill, but I can't let one of these go by without mentioning one of my fave modules:

use DirHandle; my $dh = new DirHandle("/path/to/dir") or die "Can't open /path/to/dir: $!"; while (my $entry = $dh->read()) { # here you can do either open FILE, "/path/to/dir/$entry" or next; # or like so -r "/path/to/dir/$entry" or next; # now, on to that file! <!-- your code here --> } $dh->close();

--
perl: code of the samurai