On Thu, 17 Jul 2014 17:36:28 +0300 Lars Noodén <[email protected]> wrote:
> David's example with the autosplit seems much better but if a slice
> were done instead, what would be the more elegant (least inelegant?)
> way of doing it?
I wouldn't use a slice at all:
perl -nE'say((split/\s+/)[-1])' file
--
Don't stop where the ink does.
Shawn
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
