On Jul 22, Steffen Mueller said:

>"Aaron J Mackey" <[EMAIL PROTECTED]> schrieb...
>
>> I can't seem to get this any shorter: I want the second through the
>> next-to-last elements of @F joined by " ", and then the last item of @F.
>>
>perl -ae 'print"@F[1..$#F-1]
>$F[$#F]"'

Uh...

perl -ae 'print"@F[1..@F-2]
$F[-1]"'

saves two strokes.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

Reply via email to