Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Deparse says \my(%hash) is the same as \my %hash but it isn't

by Athanasius (Abbot)
on Nov 21, 2012 at 16:46 UTC ( #1004951=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    23:10 >perl -Mstrict -wE "my @c = ('a' .. 'e'); my $q = \@c; my $r = \
    +(@c); say $q, ' --> ', @$q, qq[\n], $r, ' --> ', $$r;"
    ARRAY(0x18a5654) --> abcde
    SCALAR(0x4bc344) --> e
    
  2. or download this
     1:46 >perl -Mstrict -wE "my $q = \my @c;  @c = ('f' .. 'h'); say $q, 
    +' --> ', @$q;"
    ARRAY(0x177554c) --> fgh
    ...
    SCALAR(0x1d20f6c) -->
    
     1:46 >
    
  3. or download this
        (a) \my %hash  --> (b)  \my(%hash)
    but (b) \my(%hash) --> (c) \(my(%hash))
    
  4. or download this
     1:11 >perl -wE "warn undef;"
    Use of uninitialized value in warn at -e line 1.
    ...
    SCALAR(0x1d20f6c) at -e line 1.
    
     1:12 >
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2015-07-06 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (82 votes), past polls