An expression is false if it stringifies to any of the followingBut it wouldn't be Perl if there wasn't an exception to that:
prints just "world"use overload "bool" => sub {0}, '""' => sub {"Send in the clowns"}; my $o = bless []; # $o stringifies to "Send in the clowns" say "Hello" if $o; # No stringification happening here say "world" if "$o"; # Forced stringification
In reply to Re^4: String comparison "\x00" vs. "".
by JavaFan
in thread String comparison "\x00" vs. "".
by asprillia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |