I would like to only capture part of a list output by a function in Perl.
I thought something alone these lines would do it, but they don’t.
E.g. Capturing the last element of the list:
(, $my_var) = split(/_/,$sample_string);
E.g. Capturing the second element of the list:
(, $my_var, , ,) = split(/_/,$sample_string);
Is this possible in Perl?
Second element of the return array: