Mazhar wrote: > Hello, Hello,
> I am writing perl on windows installing Activestate Perl and the code is > reading a text file and processing it, > > the code what i use is... > > ################################## > use strict; > use warnings; > > my $file_name="XXXXXXXX.txt"; > > open(FILE,"$file_name") || die "Not been Accessed"; > while (<FILE>) { > print $_ "\n"; print() is interpreting the value in $_ as a filehandle. You need to either supply a list to print: print $_, "\n"; Or a single string: print "$_\n"; Or alternately set the output record separator: $\ = "\n"; while ( <FILE> ) { print; 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>