Geoff Hubbard <[EMAIL PROTECTED]> writes:
> On Mon, Jul 22, 2002 at 03:45:39PM -0400, Prakash Kailasa wrote:
> > On Mon, Jul 22, 2002 at 08:23:08PM +0100, Geoff Hubbard wrote:
> > >
> > > perl -pae '$_="@F[1..@F-2]
> > > $F[-1]"'
> >
> > perl -ape '$\=pop@F;$_=@F[1..@F]'
> >
> > Untested.
>
> Now tested.
>
> perl -ape '$\=pop@F;$_="@F[1..@F]
> "'
>
> It needs some quotes +2 and a newline +1
> which make it 1 char longer overall.
>
> perl -pale '$\.=pop@F;$_="@F[1..@F]"'
>
> is cool, but still 2 chars longer than:
>
> perl -ape '$_=pop@F;s//@F[1..@F]
> /'
>
> Which the same length as my first solution.
> This has been tested. ;)
Ditching that annoying -a saves a stroke. Which is nice.
perl -pe 'y/ //s;s/\S+ (.*) /$1
/'
--
Piers
"It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite."
-- Jane Austen?