in reply to Re: Put "ls" in array
in thread Put "ls" in array
Or for the grasshoppers who haven't realized yet that Perl started its life as a glue language, and never deviated from that, and hence get the rashes as soon as they see a call to an external program:my @files = grep {!/pattern_I_want_to_ignore/} `ls`;
use autodie; opendir my $dir, "."; my @files = grep {!/pattern_I_want_to_ignore/} sort grep {!/^\./} # simulate ls readdir $dir;
|
|---|