Ravi Malghan wrote:
> Hi: I just can't seem to figure this out.
> I am trying to declare two associative array
> (%nodeowner and %nodeseverity) within another array
> called %SESSION
>
> For example
> %nodeowner = ("node1", "john", "node2", "nancy");
> %nodeseverity = ("node1", 5, "node2", 10);
>
> How do I declare %SESSION containing %nodeowner and
> %nodeseverity. And how do I access say the value John
> give node1 from the nodeowner array that is in
> SESSION?
$ perl -le'
my %nodeowner = qw( node1 john node2 nancy );
my %nodeseverity = qw( node1 5 node2 10 );
my %SESSION = reverse %nodeowner, %nodeseverity;
print $SESSION{ john };
'
node1
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/