develooper Front page | perl.fwp | Postings from December 2001

Re: Santa Hole 5 (wc.pl) Post Mortem

Thread Previous
From:
Jonathan E. Paton
Date:
December 6, 2001 23:41
Subject:
Re: Santa Hole 5 (wc.pl) Post Mortem
Message ID:
20011207074059.99020.qmail@web14608.mail.yahoo.com
 --- Piers Cawley <pdcawley@bofh.org.uk> wrote:
> Michael G Schwern <schwern@pobox.com> writes:
> 
> > On Fri, Dec 07, 2001 at 10:36:50AM +1100,
> Andrew.Savige@ir.com wrote:
> >> --- Piers Cawley --------------------- 21
> >> #!/usr/bin/perl -lp
> >> $#='%010g'}{$_=$.
> >
> > Shouldn't that be 20?
> 
> Nope. The space before the '-' counts.
> 
> But I was pretty proud of this one. And surprised that
> nobody else found it. Course, I'm still annoyed that I
> found this but not the $\ based reverse.

I wish too I'd found the $\ solution... don't we all?  I
went through the entire list of special variables too, I
found $# but ruled it out as being equal total length to
printf.  As usual, I missed an opportunity.

Jonathan Paton

________________________________________________________________
Nokia 5510 looks weird sounds great. 
Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! 
The competition ends 16 th of December 2001.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About