Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Safely reading line by line

by martin (Friar)
on Jun 28, 2007 at 22:22 UTC ( #623996=note: print w/replies, xml ) Need Help??

in reply to Safely reading line by line

In order to survive malformed input while keeping the normal procedure line-oriented, I need perhaps a getline variant with some sort of length limitation. I'd like to be able to give up gracefully when excessively long lines are detected.

It turns out getline is not a trivial target to emulate, what with all those variants of $INPUT_RECORD_SEPARATOR. I have tried to prove the concept here, but with good chances to win an ugliness contest.

Should Perl perhaps offer native support for such a feature?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2016-10-25 21:06 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.