Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Hash from package

by reasonablekeith (Deacon)
on Jan 04, 2007 at 09:40 UTC ( [id://592914]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Hash from package
in thread Hash from package

I wouldn't call it cheating. You've already hardcoded some text and the hash key. Sagacity's suggestion is perfectly reasonable.

You're probably asking the wrong question. "How do I get key values from a hash?" is more likely what you're after.

foreach my $key (keys %$car) { print "$key = $car->{$key}\n"; }
---
my name's not Keith, and I'm not reasonable.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found