Anyone mind explaining why this produces "Modification of a read-only value attempted at D:\home\buu\codbot\test.pl line 9."?my %guid=(218827=>5,109940=>2); BEGIN { %handle= ( cmd => sub { my $ref = sub{$guid{218827}++;warn "sub: $guid{218827}";}; $ref->(); }, ); } $handle{cmd}->();
In reply to modification of read-only in hash ++ by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |