Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: unexpected modify hash in a distance with grep { $_ }

by LanX (Saint)
on Dec 20, 2019 at 18:26 UTC ( [id://11110443]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl 
    
    ...
    
    warn Dumper [ grep {$$h{$_}} qw/a b c x/ ];      # <-- no side effect
    warn Dumper [ keys %$h ];
    
  2. or download this
    C:/Perl_524/bin\perl.exe  d:/tmp/pm/grep_autovivify.pl 
    $VAR1 = [
    ...
              'c',
              'b'
            ];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found