Dear friends
i would like to know how do get back the keys in hashes using a print statement
and also how do we get the number of elements in a list and their indexes
eg: if i have -
print (("nothing",255, 123, 555)[2]); it prints 123
but now that i want to know which element in the list is 123?. is there a way out to do it
please reply
First, I completely back up pbmods with regards to the code tags. They are a best practice here on TSDN and should always be used to enclose any posted code.
As for your issue, you will want to read about the
keys function that comes with Perl. That is how you access the keys in a hash.
And while you are there, you may want to read the rest of the wonderful documentation they have their, including the
perlfunc page, which goes over the standard Perl functions.
Regards,
Jeff