in reply to
A better way? Extracting filename from url
Did you try basename ?
It's not the usual way (regexes or URI::... modules) but it seems to work.
(Need some testing although...)
"Only Bad Coders Code Badly In Perl" (OBC2BIP)
Results (194 votes),