in reply to Changing file names as they are uploaded

I love regex problems:
if ($filename =~ /(.*)\.(.*)?/ig) { my $fname = $1; my $ext = $2; $fname =~ s/\W/_/g; $filename = $fname . '.' . $ext; } else { $filename =~ s/\W/_/g; }
The only case I could find where it breaks is when you have a filename containing a dot (.) without an extension, but I don't know if that's a real case or not.

-----------------------------------
Washizu
Acoustic Rock