Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Read a line with max length ?

by FoxtrotUniform (Prior)
on Feb 27, 2003 at 03:24 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://238985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-23 17:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found