Re: a little shorter please?

2002-07-22 Thread Jeff 'japhy' Pinyan
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 'prin

Re: a little shorter please?

2002-07-22 Thread Ronald J Kimball
On Mon, Jul 22, 2002 at 02:41:25PM -0400, Aaron J Mackey wrote: > > 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 -ape '$,=" ";s//>@F[1..$#F-1]\n$F[$#F]/' > > or (no join, but same general

RE: a little shorter please?

2002-07-22 Thread Mtv Europe
Hello Ala! [EMAIL PROTECTED] (Ala Qumsieh) wrote: >> perl -pe 's/\s+(\S+)$/\n$1/;s/^\S+\s+/>/;' > > perl -alpe '$_=">@F[1..$#F-1]\n$F[-1]"' $#F-1 -> @F-2: -alp $_=">@F[1..@F-2]\n$F[-1]" --- Mtv Europe

Re: a little shorter please?

2002-07-22 Thread Steffen Mueller
[ Crossposted to perl.fwp and perl.golf. Reply to set to perl.golf. Hope the newsreader won't fsck it up. :) ] "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

RE: a little shorter please?

2002-07-22 Thread Ala Qumsieh
> -Original Message- > From: Aaron J Mackey [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 2:41 PM > To: [EMAIL PROTECTED] > Subject: a little shorter please? > > > > I can't seem to get this any shorter: I want the second through the > ne

a little shorter please?

2002-07-22 Thread Aaron J Mackey
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 -ape '$,=" ";s//>@F[1..$#F-1]\n$F[$#F]/' or (no join, but same general idea): perl -pe 's/\s+(\S+)$/\n$1/;s/^\S+\s+/>/;' What trick am I missing?