The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
i use these with local harddrive filenames, but they should work pretty much the same for url's
method 1: $file = substr $url, rindex($url, '/') + 1; #path contains full url method 2: $url =~ s/^.*\///; #just use the url to get the filename with a regex method 3: ($file) = $url =~ m!([^/]+)$!; #another regex way In reply to Re: A better way? Extracting filename from url
by Parham
|
|