Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-12-21 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls