my $fname = (split/\//, '/home/bin/scripts/test.pl')[-1];
update:After reading robartes answer, and rereading the question, I am guessing his answer is more along the lines of what you were looking for rather than how to get the last element of a list returned by a split statement.
-enlil
In reply to Re: Using split
by Enlil
in thread Using split
by nite_man
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |