Created
June 7, 2017 17:37
-
-
Save preaction/5bd14f5f25f12641266d5c7dd7042d22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v5.24; | |
| use Data::Dumper; | |
| my $hash = { foo => 'bar', fizz => 'buzz' }; | |
| say Dumper $hash; | |
| local $hash->@{qw( foo fizz )} = ( 'foo', 'fizz' ); | |
| say Dumper $hash; | |
| #local $hash->%{qw( foo fizz )} = ( foo => 'foo', fizz => 'fizz' ); | |
| # Can't modify key/value hash slice in local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment