in reply to Re^3: Why is Dumper returning "!!1" for true file test?
in thread Why is Dumper returning "!!1" for true file test?

> What was missing is a function whose sole purpose was to return them. That's what was recently introduced. And that's why we used !!0 and !!1 to produce them before that.

Are you referring to builtin::true etc. in builtin? Nobody has mentioned them yet in this thread.

Or are you talking about the internal &PL_sv_yes ?

On a side note: shouldn't it be possible to activate true and false while silencing the warnings with just one pragma?

use experimental qw/builtin/; use builtin qw/true false/; use Data::Dump; ddx $]; dd [true,false] __END__ # bool.pl:6: "5.036000" [1, ""]

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^5: Why is Dumper returning "!!1" for true file test?
by ikegami (Patriarch) on Jan 22, 2024 at 14:21 UTC

    Them, Perl's booleans = &PL_sv_yes and &PL_sv_no.

    Recently introduced functions = builtin::true and builtin::false