Don't try to cooerce everything into a grep.my @dirs; my @files; for (readdir DIR) { next if $_ eq "." or $_ eq ".."; if (-d "$base/$_") { push @dirs, $_; } else { push @files, $_; } }
-- Randal L. Schwartz, Perl hacker
In reply to •Re: Producing 2 lists from a grep call
by merlyn
in thread Producing 2 lists from a grep call
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |