From: Niklas Frykholm Date: 2002-05-29T10:02:28+09:00 Subject: Re: PR for ruby [John Knight]: > malug is discussing the following question. > How to print the rightmost word for every line in ? > I tried to introduce ruby to the debate. But am not sure I have the best > solution. > >> >> perl -lane 'print $F[$#F]' > > ruby -ne 'arr=split; puts "#{arr.last}"' #ruby version shows Simpler: ruby -ne 'puts split.last' // Niklas