in reply to working with mulitple files

try this:

. . . my %files = map { join('', 'com', $_) => 1 } (1 .. 20); sub first { if ($files{$_}) { . . .

Regards,

PN5