in reply to Why doesn't this work?
unquoted \0 is a reference to a literal number (i.e. read-only scalar) ...
DB<135> $/=\0 => \0 DB<136> ref $/ => "SCALAR" DB<137> ${$/} => 0
... and not the escape sequence for NUL byte!
DB<146> $/="\0" => "\0" DB<147> ord $/ => 0
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why doesn't this work?
by perl-diddler (Chaplain) on Apr 12, 2013 at 21:57 UTC | |
by LanX (Saint) on Apr 12, 2013 at 22:35 UTC | |
by choroba (Cardinal) on Apr 12, 2013 at 22:39 UTC |