There's more than one way to do things | |
PerlMonks |
Re^4: u+ fails to force scalar context to empty list assignment: +( () = ... )by LanX (Saint) |
on Mar 12, 2019 at 01:24 UTC ( [id://1231145]=note: print w/replies, xml ) | Need Help?? |
> fair enough, both work. Still different, your result is a string. Perl works hard to treat all scalar sub-types equally by operators, but I seem to remember edge cases where the internal type mattered and resulted in errors. No need to stringify a number. And a reader - at least me - would be confused.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|