Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for the help!... my @array_code = qw(x-01 x-02 x-03 x-04 v-05 v-06 v-07 x-08 x-09 x-10 +x-11); for my $file (read_dir( $dir_list, prefix => 1 )) { #files will be: 1234567_x-01_2013_03.txt 1234667_x-03_2013_03.txt + 0034567_y-01_2013_03.txt 1234567_v-01_2013_03.txt 1233567_v-05_2013_ +03.txt 1234567_x-55_2013_03.txt next if grep { /$file/ } @array_code; # not working next if(! -f $file || -s $file < $min_size) ; if(-s $file <= $max_size) { push @files, $file; }else { push @bigsize_files, $file; } } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ignore file in array without looping
by Corion (Patriarch) on Mar 27, 2013 at 18:18 UTC | |
|
Re: Ignore file in array without looping
by hdb (Monsignor) on Mar 27, 2013 at 18:17 UTC | |
|
Re: Ignore file in array without looping
by Neighbour (Friar) on Mar 28, 2013 at 09:08 UTC |