in reply to "" but true
$ perl -M5.010 -e' package Crazy { use overload bool => sub { 1 }, q{""} => sub { "" }, fallback => 1; } my $x = bless({}, Crazy::); say $x ? "true" : "false"; say length($x); ' true 0
But don't. Just don't. If you think non-printable characters are confusing, this is next level confusing. This is an XY Problem.
(U+FEFF ZERO WIDTH NO-BREAK SPACE would be a better choice than NUL, not that you should use that solution either.)
Seeking work! You can reach me at ikegami@adaelis.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "" but true
by Chuma (Scribe) on May 13, 2021 at 20:35 UTC | |
|
Re^2: "" but true
by Bod (Parson) on May 13, 2021 at 23:13 UTC | |
by LanX (Saint) on May 13, 2021 at 23:42 UTC | |
by Bod (Parson) on May 14, 2021 at 15:56 UTC | |
by LanX (Saint) on May 14, 2021 at 16:02 UTC | |
by Anonymous Monk on May 14, 2021 at 16:56 UTC | |
|