in reply to Re: Put "ls" in array
in thread Put "ls" in array

What a bunch of lines! If I wanted to ignore some pattern, why not:
my @files = grep {!/pattern_I_want_to_ignore/} `ls`;
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:
use autodie; opendir my $dir, "."; my @files = grep {!/pattern_I_want_to_ignore/} sort grep {!/^\./} # simulate ls readdir $dir;