Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by Abigail-II (Bishop)
on Jun 12, 2002 at 14:40 UTC ( #173847=note: print w/replies, xml ) Need Help??


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

Without using any slashes, backslashes, semi-colons, double quotes, command line options, and using 72 characters:
map{print qq{$_ is married to $couples{$_}@{[chr 10]}}}sort keys%coupl +es

Abigail

Replies are listed 'Best First'.
Re: Re: perl puzzle - cartoon couple registry (beginner, semi-golf)
by Util (Priest) on Jun 12, 2002 at 20:19 UTC
    My approch was similar.

    Without using any slashes, backslashes, semi-colons, command line options, only two double quotes, and using 64 characters:

    printf"$_ is married to $couples{$_}%c",10 for sort keys%couples
    Changing the double-quotes into  qq{} makes it 67 characters.

    Of course, mine fails if anyone has a % in their name. In real Golf, it is the sort of thing they would update the test script to catch.

    The most evil newline variant I considered was:

    $:=~m{.(.)}s and print "something$1"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2023-03-26 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?