andreas1234567 has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I recently discovered i bug in my code. My intention was to create a hash reference with a key for each value of an array reference.
The last line should have been written asuse strict; use warnings; use diagnostics; my $arr = [1,2,3]; my $hr = undef; map { $hr->{$_} } @{$arr};
Could this bug have been picked up by some sibling of use warnings ?map { $hr->{$_} = 1 } @{$arr};
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
Back to
Seekers of Perl Wisdom