Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Read a line with max length ?

by FoxtrotUniform (Prior)
on Feb 27, 2003 at 03:24 UTC ( #238985=note: print w/replies, xml ) Need Help??

in reply to Read a line with max length ?

    What's a quick way to read in a line (as defined by $/) with a specified maximum length?

Hmm. read FILEHANDLE, $line, $max_len will read exactly $max_len bytes into $line, which:

  • Isn't the same thing on multibyte-character input, and
  • Isn't what you want.

Nonetheless, if you're really worried, it may do the trick.

F o x t r o t U n i f o r m
Found a typo in this node? /msg me
The hell with paco, vote for Erudil!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2020-10-20 14:56 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (210 votes). Check out past polls.