in reply to Re: substr to split lines?
in thread substr to split lines?
However, when given a description like the following (which is what I am working with) it doesn't come out quite right.$description =~ s/^(\s+)?$//sg; $description =~ s/\n/ /sg; while ($description) { $f_desc .= "T".(substr($description,0,75) = "")."\n"; } print $f_desc;
The above code makes it read like:2001/08/28 10:15:54 AM auser 08/28/01 10:15:53 auser PostalCode.24th floor. MachineID, printer keeps jamming (A person' +s Name). Lexmark optra s1250. 2001/08/28 10:17:57 AM auser PostalCode.24th floor. MachineID, printer keeps jamming (A person's N +ame). Lexmark optra s1250.
So it looks like I'm missing the first line, and I'm not sure why :-)T floor. MachineID, printer keeps jamming (A person's Name). Lexmark +optra s125 T0. 2001/08/28 10:17:57 AM auser PostalCode.24th floor. MachineID, +printer kee Tps jamming (A person's Name). Lexmark optra s1250. T
|
|---|