Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Simple Anon Hash Query

by logie17 (Friar)
on Jan 21, 2007 at 21:56 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-24 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found