my @split = split(/\./,$file); my $key = $split[1];
You are assuming that there is only one period in the file name. That would probably be better as:
my $key = ( split /\./, $file )[ -1 ];
Or use File::Basename or File::Spec to get the extention.
In reply to Re^2: File ext number
by jwkrahn
in thread File ext number
by Kirche
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |