while (my $matchingFiles = glob("*.rtsd001")) { ... } #### while () { /STRUC20/ and print MODIFIED $_; }