in reply to How can I get the file name

Try this:
print substr(substr($value, rindex($value, '/')),1), "\n";

we're born with our eyes closed and our mouths wide open, and we spend our entire life trying to rectify that mistake of nature. - anonymous.