Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Golf: Movie style code cracker.

by Jenda (Abbot)
on Sep 14, 2008 at 01:58 UTC ( [id://711212]=note: print w/replies, xml ) Need Help??


in reply to Golf: Movie style code cracker.

114 including space, one letter script name, space and the parameter 10:

$"='';$|=@C=map{int rand 10}1..pop;while(@C){@X=map{int rand 10}@C;pri +nt"@F@X\r";push@F,pop@C if$C[0]eq$X[0]}
It scrolls very fast on my comp.

Update: 109 using Kyle's idea.

sub r{map{int rand 10}@_}$"='';$|=@!=r 1..pop;while(@!){@X=r@!;print"@ +F@X\r";push@F,pop@!if$![0]eq$X[0]}
Unlike some other solutions, these two work for much longer codes.

Replies are listed 'Best First'.
Re^2: Golf: Movie style code cracker.
by BrowserUk (Patriarch) on Sep 14, 2008 at 03:01 UTC
    It scrolls very fast on my comp.

    Very fast. But you aren't going to be able to build much tension in 5 milliseconds, and no one is going to believe the bad guy remembers a 500 digit pin :)


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-16 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found