[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] fwp-digest V1 #109 -Reply




Here's another 50-char solution.  The double use of map for side
effect is great Perl style, but that isn't why -w prints the
warning...

$#='%3g';map{$-=$_;print((map{$_*$-}1..9),$/)}1..9

Stealing some ideas from Aaron, we'd get these 50 characters, and no
-w warning.

for(1..9){$-=$_;printf'%3d',$_*$-for 1..9;print$/}

But obviously this can be shortened!  This is just 46 characters (&
still no warning).

for$-(1..9){printf'%3d',$_*$-for 1..9;print$/}

And it's still not a one-liner on a Vic-20.  (Is there a port to
*that*?)

-- 
Ariel Scolnicov        |"GCAAGAATTGAACTGTAG"            |ariels@compugen.co.il
Compugen Ltd.          |Tel: +972-2-6795059 (Jerusalem)	\  NEW IMPROVED URL!
72 Pinhas Rosen St.    |Tel: +972-3-7658520 (Main office)`--------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555  http://3w.compugen.co.il/~ariels

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe