Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Formatting The Communist Manifesto

by Maze (Sexton)
on Apr 06, 2007 at 16:46 UTC ( [id://608713]=note: print w/replies, xml ) Need Help??


in reply to Formatting The Communist Manifesto

Actually, this could be to do with the finding of a '0' in the data, which could cause the while loop to fail, I think I remember perl treats characters of numbers as real numbers...

either that or it's the getc, which may pose problems, apparently not a good idea to rely on it in perl

Replies are listed 'Best First'.
Re^2: Formatting The Communist Manifesto
by bart (Canon) on Apr 06, 2007 at 16:56 UTC
    either that or it's the getc, which may pose problems, apparently not a good idea to rely on it in perl
    Instead, you should stop trying to parse one character at a time. If you split on newlines, just fetch one line at a time.
Re: Formatting The Communist Manifesto
by jonadab (Parson) on Apr 06, 2007 at 20:37 UTC
    either that or it's the getc, which may pose problems, apparently not a good idea to rely on it in perl

    Indeed, I think in Perl, and I was not aware that Perl even had a getc function. With a name like that I'd lay odds ten to one that it just wraps the function of the same name in the C library, and if so, I don't want anything to do with it. Just thinking about the prospect makes me want to take a shower (as does looking at that code -- somebody apparently took six lines of nice clear legible Perl code and ran it through an extreme verbosification cycle).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found