you need to put a '/s' on those first two regexps to get them to work across multiple lines:
$description =~ s/^(\s+)?$//sg; #get rid of blank lines $description =~ s/\n/ /sg; #get rid of new lines
update:
in addition, changing the $description =~ s/$temp//; to substr($description,0,75) = "" seems to fix it and is probably better form.
In reply to Re: substr to split lines?
by thraxil
in thread substr to split lines?
by the_slycer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |