in reply to Re^2: perl system command
in thread perl system command
in order to get what I want
It isn't overly clear what you want. If you have a string with words separated by underscores and just want to return the last such word then you could do this:
my $row = 'We_need_feed'; my ($last) = $row =~ /[^_]*$/g; print $last;
or you could split and then pop but maybe extracting the last isn't what you want at all.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: perl system command
by cbtshare (Monk) on Nov 10, 2016 at 16:27 UTC | |
by hippo (Archbishop) on Nov 10, 2016 at 16:56 UTC |