If you are willing to accept the dubious definition of an extension being the characters after the last period, then the following will work:
my $ext = ''; $ext = $1 if $file =~ /\.(.*?)$/;
In reply to Re:Getting a file's extension in an upload form
by pbeckingham
in thread Getting a file's extension in an upload form
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |