in reply to Question on File position, pulling words
or more succinctly:my @line_fields = split " ", $line; my $penultimate = $line_fields[-2]; my $last = $line_fields[-1];
my ($penultimate, $last) = (split " ", $line)[-2, -1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question on File position, pulling words
by Narveson (Chaplain) on Mar 04, 2008 at 07:28 UTC | |
|
Re^2: Question on File position, pulling words
by taints169 (Initiate) on Mar 04, 2008 at 15:40 UTC |