Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^4: Assigning value through references

by Prof Vince (Friar)
on Oct 09, 2007 at 08:15 UTC ( #643641=note: print w/ replies, xml ) Need Help??

Comment on Re^4: Assigning value through references
Download Code
Replies are listed 'Best First'.
Re^5: Assigning value through references
by m0ve (Scribe) on Oct 09, 2007 at 09:06 UTC
    i always use strict but got not no complaints as perl took it as a hash,
    not a reference, but i remembered it would somehow work without arrows, like this
    my $crd = ${$ref}{$key}{NAME};
      $ref{$key}{NAME} and ${$ref}{$key}{NAME} are two completely different things. But you can say that the latter is another form of arrow notation (the first arrow, because it's a dereference operator), so they are both a hash reference.
      my $env = \%ENV; print $env->{SHELL}; print ${$env}{SHELL}; print $env{SHELL}; # barks under strict, undefined otherwise # output: /bin/bash /bin/bash

      Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2015-11-29 05:07 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 (746 votes), past polls