in reply to Display shortened paragraph
my $maxlen = 20; # could be 255 if you like my $memo = "This is a really long string and I only need to show the f +irst $maxlen characters..."; print substr( $memo, 0, $maxlen ), "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Display shortened paragraph
by blazar (Canon) on Feb 01, 2006 at 11:57 UTC |