in reply to A brain twister? (how to make 2 lines->1)
If you don't have arrays & hashes in your hash, then a simple map might help:
print "{", join(", ", map { "$_=>$ahash{$}" } keys %ahash), "}\n";
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A brain twister? (how to make 2 lines->1)
by perl-diddler (Chaplain) on Jun 25, 2012 at 02:59 UTC | |
by dave_the_m (Monsignor) on Jun 25, 2012 at 08:12 UTC | |
by MidLifeXis (Monsignor) on Jun 25, 2012 at 13:00 UTC |