$subject="http://www.spied.co.nz/thinmailer.cgi"; @ar = split (/\//, $subject); $filename = @ar[$#ar]; print $filename;