Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^3: How to declare variables per loop

by vagabonding electron (Hermit)
on Oct 13, 2011 at 08:55 UTC ( #931166=note: print w/ replies, xml ) Need Help??

in reply to Re^2: How to declare variables per loop
in thread How to declare variables per loop

Thank you very much wfsp.
After overnight I thought even that it were possible to combine the title for the evaluation and the titles for the diagramms in one hash. One should then input a shorthand for the evaluation at the command line.
This below is just a fragment, I am tinkering now : -)
Thanks again!

use strict; use warnings; if (!defined $ARGV[0]) { die " Please type the shorthand: THIS for This Great Evaluation THAT for That Small Evaluation "; } my $topic = $ARGV[0]; my %module = ( THIS => [ { name => q{This Great Evaluation}, indicator => { '01' => q{The First}, '02' => q{The Second}, }, }, ], ); print ${module}{$topic}[0]->{name}; print ${module}{$topic}[0]->{indicator}{'01'}; print ${module}{$topic}[0]->{indicator}{'02'};

Comment on Re^3: How to declare variables per loop
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-11-25 08:20 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (672 votes), past polls