Using grep:foreach (@data) { next if $_ eq "." || $_ eq ".."; push @dir, $_ if -d "./desktop/$_"; }
@dir = grep { $_ ne "." && $_ ne ".." && -d "./desktop/$_" } readdir(TEXTFILES);
--ZZamboni
In reply to Re: Re: Re: Re: Re: Getting a simple directory listing
by ZZamboni
in thread Getting a simple directory listing
by Stamp_Guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |