Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2019-10-22 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?