in reply to substr to split lines?
Your loop fails because using s/// is a poor idea here. If $temp contains any regex characters, you're busted. You want to use the four argument substr().
That returns the 75 characters and removes them from $description.while (length $description) { $f_desc .= "T" . substr($description, 0, 75, '') . "\n"; }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|