in reply to Quick Regex question

You can also try the following:
my ( $filename ) = ( $path =~ /(\w+(?:\.\w+)?)$/ );
The 'optional' section at the end is there because someone may upload a file without an extension.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.