We don't bite newbies here... much | |
PerlMonks |
Re: Re: Array emptyby bart (Canon) |
on Oct 05, 2003 at 14:11 UTC ( [id://296705]=note: print w/replies, xml ) | Need Help?? |
Close. But ord($_) returns 0 not because it contains a null byte, but because it is an empty string.
prints: 0 (Where on earth would he be getting null bytes from?) Indeed, the resulting array he's getting after doing is ("", "", "", "", "", "\n") The explanation: every character in the input string, except the newline, is used as a split delimiter. Thus you get, as a result, the stuff between those characters, which is nothing every time, except at the last character.
In Section
Seekers of Perl Wisdom
|
|