... push @files, grep { -f and -s $_ >= $min_size and -s $_ <= $max_size } read_dir( $d, prefix => 1 ); ...