Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: hash problems

by perldeveloper (Scribe)
on Jul 08, 2004 at 11:11 UTC ( #372747=note: print w/replies, xml ) Need Help??


in reply to hash problems

If the order matters, then you'll have to use arrays. Better assign two keys to your $hash, one for an array of numbers (say @{$hash->{numbers}}) and one for an array of signs (@{$hash->{signs}}). Then look within the numbers array (@{$hash->{numbers}}, find the corresponding $i (that is $hash->{numbers}->[$i]) and extract the two signs: $hash->{signs}->[$i] and $hash->{signs}->[$i + 1].

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2023-03-28 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (67 votes). Check out past polls.

    Notices?