in reply to A question of efficiency
Also, you should probably use glob() to get the same results, rather than reading all the filenames and filtering them:
foreach my $entry (glob('10.*')) { } [download]