if Len($lRow) > 1000 { $lRow = substr($lRow, 0, 1000); $lRow =~ tr/\. xxxx$//; # here is where I have trouble }