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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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



jazzo
Novice

Aug 27, 2012, 12:47 PM


Views: 1167
Re: [FishMonger] reversing a hash

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

Code
 
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

Code
Lucy Exeter Samantha Oregon Gary Dallas Ian Reading

and the reversed one which gave

Code
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