Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to jump to open the next file in the same folder?

by samurai (Monk)
on Oct 17, 2002 at 04:02 UTC ( [id://205931]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://205931]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-24 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found