in reply to each %hash: scalar context of list (undef, undef) is false

... additionally ...

 scalar (3 .. 4) in scalar context is the flip flop operator, not a range and its false hence empty string.

 scalar 3 .. 4 is just  (scalar 3) .. 4

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)