While I agree that the code is clearer with a substitution rather than capturing stuff in $1, the advantage of the latter is that it untaints the input, and it's definitely preferable for web scripts to run in taint mode. Something like this should work:
($fn) = ($fn =~ m#([^/\\]+)$#;However for getting the basename of a path I'd tend to use File::Basename — though that doesn't play well with the desire to untaint ...
Smylers
In reply to Re: upload on different browsers
by Smylers
in thread upload on different browsers
by dannoura
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |