in reply to How to look for two different file extensions?

hello Superbroom2.0 and take my welcome to the monastery (even if bit late)!

I'd go in another way: glob is very useful in these situations:

my @file_to_process = glob('*.xlsx *.pdf'); die "No file to process!" unless $file_to_process[0]; print scalar @file_to_process, " files found\n"; foreach my $file (@file_to_process){ # your processing here ...

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.