CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: Re: [FishMonger] reversing a hash: Edit Log


Aug 27, 2012, 12:47 PM

Views: 1377
Re: [FishMonger] reversing a hash

thanks, I tried that but it looks like I need to install something, is there a package or something:

antobbo@antobbo-xps17-ubuntu:~$ perldoc -q 'How do I look up a hash element by value?'
You need to install the perl-doc package to use this program.

Ah sorry I forgot to add this: I have printed both the hashes, the normal one which produced

Lucy Exeter Samantha Oregon Gary Dallas Ian Reading

and the reversed one which gave

Oregon Samantha Exeter Lucy Reading Ian Dallas Gary

so it appears as if reversing a hash swaps the value and keys?!

(This post was edited by jazzo on Aug 27, 2012, 1:08 PM)

Edit Log:
Post edited by jazzo (Novice) on Aug 27, 2012, 1:08 PM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives