Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Please help, (perl hash)

by SimonClinch (Chaplain)
on May 16, 2011 at 14:09 UTC ( #905082=note: print w/ replies, xml ) Need Help??


in reply to Please help, (perl hash)

Normally the hash of hash as stated. But there is interestingly an array of array option for this very specific case where the towns and streets are nameless and have a contiguous identification system. For example

$array[ ord( $town ) - 65 ][ $street - 1 ] = $houses;
the expression involving ord converts the town letter into its corresponding position in the outer array and the inner array needs only the subtraction of one to map streets 1-9 to their array indexes in Perl.

One world, one people


Comment on Re: Please help, (perl hash)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-09-19 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (132 votes), past polls