in reply to
split string and always get last word
Use a list slice.
my $last = ( split '/', $str )[ -1 ];
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
Comment on
Re: split string and always get last word
Download
Code
In Section
Seekers of Perl Wisdom