Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: A Question on a homebrew XML parser

by wog (Curate)
on Jan 23, 2002 at 06:22 UTC ( #140788=note: print w/ replies, xml ) Need Help??

in reply to A Question on a homebrew XML parser

The loop is exiting because of your test:

CHAR: while($currSymbol = getc($fh)) {
The character 0 is false, and thus fails this test. You probably should use something like:
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.)

Comment on Re: A Question on a homebrew XML parser
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://140788]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2015-10-09 22:00 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (252 votes), past polls