in reply to Producing 2 lists from a grep call
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"; } [download]