Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: truncating a line

by ctilmes (Vicar)
on Jul 01, 2003 at 13:56 UTC ( [id://270469]=note: print w/replies, xml ) Need Help??


in reply to truncating a line

use the substr() as an lvalue:
substr($str, 17) = '...' if length $str > 17;

Log In?
Username:
Password:

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

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

    No recent polls found