in reply to Getting a file's extension in an upload form
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 =~ /\.(.*?)$/; [download]