On 7/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

%coins = ( "12345" , 91,
           "987658" ,35.5,
           "wer123", 99.8,
                    "456hn",56.4,
                        "34567",78.9,
                        "00000",99.9,
                        "yui345",45.4);

wat i need is for ex if i gave 34567 it has to tell the position of
the hash 4th position...

It's not the fourth position; it's the value filed under key "34567".
And that's here:

   $coins{"34567"}

That's part of the elegance of a hash; direct access to any element.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to