Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: truncating a line

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


in reply to truncating a line

you'll want to use substr:

my $long_line= 'this line is more than seventeen characters.'; my $short_line= substr( $long_line, 16, length $long_line ) .= '...';

~Particle *accelerates*

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found