in reply to Re^2: Why doesn't exist work with hash slices?
in thread Why doesn't exist work with hash slices?
According to perldoc -f delete, it returns the deleted value, not a Boolean. And,
$ perl -E 'my %foo = qw{ bar 42 }; say delete $foo{bar};'
in fact prints 42.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Why doesn't exist work with hash slices?
by ikegami (Patriarch) on Sep 21, 2025 at 16:16 UTC | |
Re^4: Why doesn't exist work with hash slices?
by LanX (Saint) on Sep 21, 2025 at 14:02 UTC | |
by ysth (Canon) on Sep 21, 2025 at 20:15 UTC | |
by LanX (Saint) on Sep 22, 2025 at 09:17 UTC |