On 22 July 2014 21:14, Eric Brine <ikeg...@adaelis.com> wrote:
> On Mon, Jul 21, 2014 at 12:08 PM, demerphq <deme...@gmail.com> wrote:>>> The part I consider the most serious bug is that srand(()) or sleep(())>> are treated the same as srand(undef) or sleep(undef). That is an empty>> list, it should not be treated as a value.>>>> >perl -E"say prototype 'CORE::sleep'"> ;$>> It's Perl's stupid prototypes. ($) means "one argument evaluated in scalar> context", so (;$) means "no arguments or one evaluated in scalar context".>> >perl -E"sub x(;$) { say 0+@_; } x(());"> 1>> A stub in scalar context is undef.>> >perl -MDevel::Peek -e"$x = (); Dump($x);"> SV = NULL(0x0) at 0x229240> REFCNT = 1> FLAGS = ()>>
Interesting. Thanks. That does make sense, in a sad way.
Cheers,
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"