I am reading in a text file that has input similar to this. date|data|data|data\n
I then read the file in and using a while loop I chomp off the new line. while (<IPO>){ chomp; @line=split /\|/,$_; $line[2]=~s/ //g; print "$_" foreach (@line); last; $count++; last if ($count == 7); } Here is the mystery. the output has a newline at the end of it. It should print "data data data data" and then my next prompt should be right here. instead it prints "data data data data "and my prompt is here. If I remove the initial chomp then I get a double space at the end. No matter what I print the last element gets a new line ????? Example if I print "$line[0] $line[1]"; then right at the end of the print statement is a new line and the output is identical to what I previously described. the last elements always inherits a new line. It driving me crazy!!! thanks in advance :) Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]