in reply to A better way? Extracting filename from url
An easy way to do this is this simple regexp:
my ($file) = $url =~ /\/([^\/]*?)(?:\?|$)/
This will work with host:port, directories and parameters given in the url. Hope this works for you..
-octo-
--
GED/CC d-- s:- a--- C++(+++) UL+++ P++++$ L++>++++ E--- W+++@ N o? K? w-- O- M-(+) V? !PS !PE !Y PGP+(++) t-- 5 X+ R+(+++) tv+(++) b++@ DI+() D+ G++ e->+++ h!++ r+(++) y+