Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: What's the difference between $heap->{127.2}{127.1.0.2} and $heap->{'127.2'}{'127.1.0.2'} ?

by sunshine_august (Scribe)
on Dec 22, 2008 at 09:21 UTC ( [id://732010]=note: print w/replies, xml ) Need Help??


in reply to Re: What's the difference between $heap->{127.2}{127.1.0.2} and $heap->{'127.2'}{'127.1.0.2'} ?
in thread What's the difference between $heap->{127.2}{127.1.0.2} and $heap->{'127.2'}{'127.1.0.2'} ?

the output like this:
use warnings; use strict 'refs'; (my $heap = {}); ($$heap{'172.16'} = 1); print("\$heap->{'172.16'}: $$heap{'172.16'}\n"); print("\$heap->{172.16}: $$heap{172.16}\n"); ($$heap{'127.2'}{'127.1.0.2'} = 2); print("\$heap->{'127.2'}{'127.1.0.2'}: $$heap{'127.2'}{'127.1.0.2'}\n" +); print("\$heap->{127.2}{127.1.0.2}: $$heap{127.2}{127.1.0.2}\n");
and have the same executed result:
$heap->{'172.16'}: 1 $heap->{172.16}: 1 $heap->{'127.2'}{'127.1.0.2'}: 2 Use of uninitialized value in concatenation (.) or string at testHash3 +.pl line 25. $heap->{127.2}{127.1.0.2}:
  • Comment on Re^2: What's the difference between $heap->{127.2}{127.1.0.2} and $heap->{'127.2'}{'127.1.0.2'} ?
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found