On Thu, 29 Nov 2001, Jeff 'japhy' Pinyan wrote:

> >> > perl -p0 -e'1while s/.*?\n(.*\n).+\n?/$1/s;s/\n.*//'
> >>   perl -p0 -e'1while s/.*?\n(.*\n).+\n?/$1/s;s/\n.*//'  (Yanick)
> >>   perl -p0 -e'$n=y|\n||>>1;s/(.*\n){$n}//;s/\n.*//s'    (Andrew)
> >>   perl -p0 -e'$n=1+y|\n||/2;/(.*\n){$n}/;$_=$+'         (Yv2.0)
> 
>      perl -p0 -e'$n=1+y|\n||/2;($_)=/(.*\n){$n}/'          (japhy)

Cheating, because it uses an array, but:
       perl -0naF'\n' -e'print @F[@F>>1]'                    (dave0)

-dave0
-- 
aitchteeteepeecolonslashslashtripledoubleyoudotevilplotdotorgslashtildedave
"Not much call for a barbarian hairdresser, I expect.  I mean, no-one
 wants a shampoo-and-beheading"   -- ``Sourcery'', Terry Pratchett

Reply via email to