Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with HASH in perl!

Status
Not open for further replies.

newbie1006

Technical User
Jun 10, 2011
9
US
How can I point to an array using hash?

I have an array and I have a hash, I want the data in the array to be accessed through hash. How can I do that??

Please help me out. Thank you in advance.
 
If you mean something like the mixed hasharray of php, that is not available in perl.
You'll need to transfer the data from the array to a hash before accessing them with hash keys
...or...
you can create the hash first by using numeric keys (but of course no [tt]pop[/tt] , [tt]push[/tt] and the like will be available then).

Franco
: Online engineering calculations
: Magnetic brakes for fun rides
: Air bearing pads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top