Use a list slice.
my $last = ( split '/', $str )[ -1 ];⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: split string and always get last word
by diotalevi
in thread split string and always get last word
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |