Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Hash from package

by reasonablekeith (Deacon)
on Jan 04, 2007 at 09:40 UTC ( #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? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-08-08 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?