Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Friday Golf: All 2-digit combinations

by hardburn (Abbot)
on Sep 26, 2003 at 14:30 UTC ( #294436=note: print w/replies, xml ) Need Help??


in reply to Re: Friday Golf: All 2-digit combinations
in thread Friday Golf: All 2-digit combinations

Take out two ';' and the whitespace after the unless and you're down three more strokes:

for('00'..'99'){$x{$_}++unless$x{reverse()}}print keys%x

56

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://294436]
help
Chatterbox?
[james28909]: i forgot how to link my scratch pad
[Lady_Aleena]: [pad://]
[james28909]: my scratchpad
[james28909]: and like i say, is just an example, not working code, but hopefully you understand what i mean. :)
[james28909]: and like i say, it would be alot of work to get around renaming 3 subs haha

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2017-05-24 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?