foreach my $filename (@files) {                # $filename = '45646.txt';      my($base) = $filename =~ /(.+?)\..+?$/;   # $base = 45646;      $hash{$base} = $filename;                 # $hash{'45646'} = '45646.txt'; }