in reply to Re: unlinking multiple files at once
in thread unlinking multiple files at once

In most cases, this is my preferred method because you have more control than a glob (you have the full power of Perl's Regular Expressions at your disposal). Although as boo_radley points out - this will delete all files beginning with 3 digits. The original question was regarding a specific set of three digits.

And since you only want to delete files - not directories, you might want to change the grep:
my $prefix = '123'; my @digit_files = grep { /^$prefix/ && -f } readdir( CUR );
Update: fixed formatting and added why I prefer this method over globbing.

Simon Flack ($code or die)
$,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
=~y'_"' ';eval"die";print $_,lc substr$@,0,3;