in reply to Re: Re: Re: Re: Producing 2 lists from a grep call
in thread Producing 2 lists from a grep call
I think we can agree that the FOR LOOP/IF STATEMENT is probably a nicer solution ? :)Especially since it's almost the for loop I posted - just s/map/for/, pull the (readdir DIR) up top, slip a next into the loop, and there you have it.
But if the Communications Decency Act had gone through I wouldn't have been able to even post this.my @dir; my @files = map { ($_ ne '.') && ($_ ne '..') && -d "$base/$_" ? do { push @dir, $_; () } : -f "$base/$_" && $_ } readdir DIR;
Makeshifts last the longest.
|
---|