in reply to Pattern Matching
if ($file =~ /^0{12}(\d{5})A001$/) { next unless ($1 > 1 and $1 < 10174); # unlink $file goes here } [download]