Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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.)

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 drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-06-26 14:57 GMT
Find Nodes?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...

    Results (330 votes). Check out past polls.