Hi All
As a beginner in PERL, I wrote a small program which reads data from the file and 
stores in an array. In that process i wanted to skip the new line character...

for ex: In my program

say "a.txt" contains

man
pan

tan

In the program

open INPUT,"a.txt" or die $!;
my @file = <INPUT>;

when I print the file, I could see $file[2] and $file[4] has only new line character...

So while I store in the array I should skip this character..I tried chop and 
chomp..Not effective....

Thanks
Anish

Reply via email to