Richard Heintze wrote:
This code is not reading the entire file. It is my
intent that it read the entire file. Can somone help
me remedy this problem?

 Thanks,
   Siegfried

      open (INFILE,  "data.txt");
      my $backgr_data=<INFILE>;

First, please don't reply to an unrelated post to start a new thread. This throws off things for people who have threading support in their mailreaders.


Second, the <> operator is the same as calling 'readline'. It only reads one line of the file. Try:

open INFILE, "< data.txt";
my $backgr_data;
while(<INFILE>) {
  $backgr_data .= $_;
}

--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


-- 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