in reply to Using split

This is a very common Perl idiom that lets you toss stuff caught in regex matches into lists. Note you need list context so the () around $filename are required for $1 to be assigned to it correctly.

($filename) = '/path/to/file.name' =~ m!([^/]+)$/;

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print