Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Try a list of list refs.

by TGI (Parson)
on Nov 10, 2000 at 00:56 UTC ( [id://40815]=note: print w/replies, xml ) Need Help??


in reply to Kiddie Codes

For the cyphertest lookup try using the indexes of your arrays as keys. This should be speedy and cheaper from a memory standpoint.

Split your cyphertext 'letters' into two digits. Then create a list of list references.Something like this:

@ct[2,5,8]=['d', 'j', 'f', 'b', 'g', 'q', 'k', 's', 'r', 'l']; print $ct[2][3]; # Should print b.

Warning:code untested as all get out.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-07-22 07:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.