Nath, Alok (STSD) wrote:
> Hi Guys,

Hello,

> I have this script which reads this text file and splits each line
> based on comma operator.The strange thing is it is removing the last
> character from the last word in the last line.So it is not displayed 
> completely.
> Can anybody tell me why its so ?

chop() removes the last character from a line no matter what it is so if the
last line in the file does not end with a newline this will happen.  Use
chomp() instead.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to