Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks  

Re: Number notation

by srawls (Friar)
on Jun 20, 2001 at 18:15 UTC ( [id://90118]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Number notation

because 2 == 02 is in numeric context. $array{$var2} is in string context. Just add int to the code like such:
print $array{int($var2)}

The 15 year old, freshman programmer,
Stephen Rawls

Replies are listed 'Best First'.
Re: Re: Number notation
by Michalis (Pilgrim) on Jun 20, 2001 at 20:41 UTC
    Thanks, the usage of int() is a solution, and probably the one I'll follow (although, the hash is so small that i'ld be probably better to just add the extra keys :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://90118]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.