in reply to A Question on a homebrew XML parser
The loop is exiting because of your test:
The character 0 is false, and thus fails this test. You probably should use something like:CHAR: while($currSymbol = getc($fh)) {
CHAR: while( defined($currSymbol = getc($fh)) ) {
(If you were using <$fh> to read from the file this would not be a problem even if you read 0 only because perl special cases that to have an implict defined() around it.)
|
---|
In Section
Seekers of Perl Wisdom