$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