in reply to perl puzzle - cartoon couple registry (beginner, semi-golf)
It weights in at 63 characters.#!/usr/bin/perl -l %couples = ( Fred=>"Wilma", Barney=>"Betty", George=>"Jane", Homer=>"Marge", Pter=>"Lous" ); map print, map "$_ is married to $couples{$_}",sort keys%couples
Which is 62 characters.%c=%couples,map print,map "$_ is married to $c{$_}",sort keys%c
I don't know what I was thinking *grin*
In a semi related note I used this when someone wanted to
a print out of the @INC.
--
Mortic
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl puzzle - cartoon couple registry (beginner, semi-golf)
by belg4mit (Prior) on Jun 13, 2002 at 03:32 UTC |