the_slycer has asked for the wisdom of the Perl Monks concerning the following question:
$description =~ s/^(\s+)?$//g; #get rid of blank lines $description =~ s/\n/ /g; #get rid of new lines while ($description) { my $temp = substr($description,0,75); #get first 75 $description =~ s/$temp//; #strip the 75 $f_desc .= "T" . $temp . "\n"; #put a newline at the end } #when the loop is done, $f_desc should hold the parsed description
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: substr to split lines?
by japhy (Canon) on Aug 28, 2001 at 23:06 UTC | |
|
Re: substr to split lines?
by thraxil (Prior) on Aug 28, 2001 at 22:34 UTC | |
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 | |
by the_slycer (Chaplain) on Aug 28, 2001 at 23:04 UTC |