in reply to substr to split lines?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: substr to split lines?
by dvergin (Monsignor) on Aug 28, 2001 at 22:50 UTC | |
by thraxil (Prior) on Aug 28, 2001 at 22:52 UTC | |
by John M. Dlugosz (Monsignor) on Aug 29, 2001 at 08:53 UTC | |
|
Re: Re: substr to split lines?
by the_slycer (Chaplain) on Aug 28, 2001 at 23:04 UTC |