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.if ($filename =~ /(.*)\.(.*)?/ig) { my $fname = $1; my $ext = $2; $fname =~ s/\W/_/g; $filename = $fname . '.' . $ext; } else { $filename =~ s/\W/_/g; }
-----------------------------------
Washizu
Acoustic Rock
In reply to Re: Changing file names as they are uploaded
by Washizu
in thread Changing file names as they are uploaded
by katgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |