Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Producing 2 lists from a grep call

by dws (Chancellor)
on Jun 16, 2002 at 19:52 UTC ( [id://174962]=note: print w/replies, xml ) Need Help??


in reply to Producing 2 lists from a grep call

What you've got works, but if you're concerned about space overhead, you could do something like
foreach my $file ( readdir(DIR) ) { push @dirs, $file if -d "$base/$file" and $file ne "." and $file ne ".."; push @files, $file if -f "$base/$file"; }

Log In?
Username:
Password:

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

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

    No recent polls found