Thanks, de-referencing the passed hashref and operating on that does what I need, as this one-liner demonstrates :
perl -w -MData::Dumper -e 'use strict; my $hash = {a => 1, b => 2}; sub mysub{my $h = shift; my %dh = %$h; delete $dh{"b"}}; mysub($hash); print Dumper($hash)'In reply to Re^3: Global variable unexpectedly modified when passed by reference
by fshrewsb
in thread Global variable unexpectedly modified when passed by reference
by fshrewsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |