Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: perl puzzle - cartoon couple registry (beginner, semi-golf)

by gumby (Scribe)
on Jun 12, 2002 at 19:44 UTC ( [id://173975]=note: print w/replies, xml ) Need Help??


in reply to perl puzzle - cartoon couple registry (beginner, semi-golf)

$c=[{Fred=>1, Barney=>2, George=>3, Homer=>4, Peter=>5} "Wilma", "Betty", "Jane", "Marge", "Lois" ]; while(my($h,$w)=each %$c){print"$h is married to $w\n";}
I have noticed that this is an extremely braindead post. D'oh!

Replies are listed 'Best First'.
Re: Re: perl puzzle - cartoon couple registry (beginner, semi-golf)
by gumby (Scribe) on Jun 12, 2002 at 19:51 UTC
    #!/usr/bin/perl -w -l %couples = ( Fred=>"Wilma", Barney=>"Betty", George=>"Jane", Homer=>"Marge", Peter=>"Lois" ); print"$h is married to $w"while(($h,$w)=each%couples)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://173975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (None)
    As of 2024-04-25 01:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found