Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by Abigail-II (Bishop)
on Jun 12, 2002 at 14:40 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-28 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found