Skip to content

Instantly share code, notes, and snippets.

@samcv
Created July 3, 2018 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samcv/1dff1d2acb7e32ba7a68f8a0231ac01f to your computer and use it in GitHub Desktop.
Save samcv/1dff1d2acb7e32ba7a68f8a0231ac01f to your computer and use it in GitHub Desktop.
> my %hash; for ^10 { %hash{$_} = 1 };
Nil
> my %hash; for ^10 { %hash{$_} = 1 }; my $i = 99; for %hash.keys { .say; %hash{$i++} = 1; }
8
Warning: trying to insert into the hash while iterating has undefined functionality
0
Warning: trying to insert into the hash while iterating has undefined functionality
7
Warning: trying to insert into the hash while iterating has undefined functionality
99
Warning: trying to insert into the hash while iterating has undefined functionality
1
Warning: trying to insert into the hash while iterating has undefined functionality
102
Warning: trying to insert into the hash while iterating has undefined functionality
3
Warning: trying to insert into the hash while iterating has undefined functionality
101
Warning: trying to insert into the hash while iterating has undefined functionality
4
Warning: trying to insert into the hash while iterating has undefined functionality
100
Warning: trying to insert into the hash while iterating has undefined functionality
5
Warning: trying to insert into the hash while iterating has undefined functionality
2
Warning: trying to insert into the hash while iterating has undefined functionality
105
Warning: trying to insert into the hash while iterating has undefined functionality
6
Warning: trying to insert into the hash while iterating has undefined functionality
9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment