Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: A "simple" question regarding accessing a value in a complex data structure.

by wjw (Curate)
on Oct 09, 2013 at 07:08 UTC ( #1057493=note: print w/ replies, xml ) Need Help??


in reply to A "simple" question regarding accessing a value in a complex data structure.

Try this,

use strict; use warnings; my %tgs = ( 'articles' => { 'Java' => 'How to Program in Java', 'Perl' => 'Perl Programming for Biologists', 'Python' => { 'Programming' => q/Expert's Guide to Scala/ +, }, }, 'eBooks' => { 'Linux' => q/Linux: A Beginner's Guide/, }, ); print $tgs{articles}{Python}{Programming};
Hope that helps,
...the majority is always wrong, and always the last to know about it...
Insanity: Doing the same thing over and over again and expecting different results.


Comment on Re: A "simple" question regarding accessing a value in a complex data structure.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1057493]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2015-07-31 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls