in reply to A better way? Extracting filename from url
use URI; while (<DATA>) { my $file = (URI->new($_)->path_segments)[-1]; print $file, "\n"; } __DATA__ http://www.spied.co.nz/thinmailer.cgi http://www.site.com/dir/file.html?param1=val1¶m2=val2
gav^
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A better way? Extracting filename from url
by theorbtwo (Prior) on Jan 14, 2002 at 21:01 UTC |