in reply to Re^2: Sometimes undef is initialized and sometimes not when hash values are fed to grep
in thread Sometimes undef is initialized and sometimes not when hash values are fed to grep
can't test the latter
Unfortunately, that one doesn't work:
use warnings; use strict; use Data::Dumper; no autovivification; my %h = (a => 'alfa', b => 'beta'); print map { ">>$_<<\n" } $h{a}, $h{333}, $h{b}; print Dumper(\%h); __END__ Use of uninitialized value $_ in concatenation (.) or string at 111127 +86.pl line 8. >>alfa<< >><< >>beta<< $VAR1 = { '333' => undef, 'a' => 'alfa', 'b' => 'beta' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Sometimes undef is initialized and sometimes not when hash values are fed to grep
by LanX (Saint) on Feb 11, 2020 at 16:54 UTC |