$subject="http://www.spied.co.nz/thinmailer.cgi"; $subject=~ s/.*\/([^\/]*)$/$1/; print $subject