in reply to A better way? Extracting filename from url
One way would be :
$subject="http://www.spied.co.nz/thinmailer.cgi"; $subject=~ s/.*\/([^\/]*)$/$1/; print $subject
What this does is return the last block of code that does not contain a backslash, from the last backslash to to the end of line.
This page is intentionally left justified.
|
|---|