No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It works, but I guess you've also got to consider the possibility that the URL will contain query parameters, like this:
http://www.site.com/dir/file.html?param1=val1¶m2=val2
So a second substitution (I'm sure you can do it with a lookahead assertion or similar, but that seems a bit overkill) is probably in order: $file =~ s/\?.*//;
Cheers, In reply to Re: Re: A better way? Extracting filename from url
by moodster
|
|