in reply to reg expression

use strict; use warnings; will probably help you finding what's wrong. What's $1 supposed to be ? It looks like you're looking for $_ instead.
use strict; use warnings; my @filelist=qw( FRAUD-REPORT01032006.CSV toto tata ); my @curr; foreach my $file ( @filelist) { push @curr, $file if $file =~ /FRAUD-REPORT\d+\.CSV/i } sort @curr; print "@curr";