Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Simple Anon Hash Query

by logie17 (Friar)
on Jan 21, 2007 at 21:56 UTC ( #595814=note: print w/replies, xml ) Need Help??


in reply to Simple Anon Hash Query

If you're going to be using a referenced hash then the following code will do the trick for you. It gets a little confusing when to use {} and when to use (), at least I would always get these mixed up.
#! /usr/local/bin/perl use warnings; use strict; my $allData = { src1 => { dest1 => '112.112.112.112', dest2 => '112.112.112.113' }, src2 => { dest1 => '192.168.1.101', dest2 => '192.167.1.102' } }; foreach my $source ( keys %{$allData}){ foreach my $dest (keys %{$allData->{$source}}){ #blah } }

Hope that makes sense or helps.
Cheers!
s;;5776?12321=10609$d=9409:12100$xx;;s;(\d*);push @_,$1;eg;map{print chr(sqrt($_))."\n"} @_;

Replies are listed 'Best First'.
Re^2: Simple Anon Hash Query
by murtu_4u (Initiate) on May 27, 2008 at 16:15 UTC
    Thank you all ! That had solved the problem

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-08-10 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?