hi!

  actually are those snippets are exactly equal to:

  @a = <>;
  print $a[@a/2];

  using big string is the same as using array, so if the
  `perl -p0 -e...'s are solutions then the rule `not using
  arrays' seems quite artificial and senseless...

P! Vladi.
ps: the example above has one big advantage over `perl -p0 -e's and it is
that is far more readable and stable :)))

Yanick wrote:
> 
> On Thu, Nov 29, 2001 at 08:51:36PM -0500, Yanick wrote:
> > On Thu, Nov 29, 2001 at 08:49:10PM -0500, Yanick wrote:
> > > On Thu, Nov 29, 2001 at 08:01:27PM -0500, Jeff 'japhy' Pinyan wrote:
> > > > On Nov 29, Yanick said:
> > > >
> > > > >> > 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)
> > >
> > >        perl -p0 -e'1while($_)=/\n(.*)\n/s;$_=$1'             (Yv3.0)
> >        perl -p0 -e'$_=$1 while/\n(.*)\n/s'                   (Yv3.1)
>          perl -p0 -e'$_=$1while/\n(.*)\n/s'                   (Yv3.2)
> 
> And that's the end for tonight, I swear...
> 
> Joy,
> Yanick

-- 
Vladi Belperchinov-Shabanski <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Personal home page at http://www.biscom.net/~cade
DataMax Ltd. http://www.datamax.bg
Too many hopes and dreams won't see the light...

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to