On Thu, 17 Jul 2014 17:36:28 +0300
Lars Noodén <lars.noo...@gmail.com> 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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to