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
In reply to Re: Using split
by tachyon
in thread Using split
by nite_man
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |