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.
my name's not Keith, and I'm not reasonable.
In Section
Seekers of Perl Wisdom