3:01pm, 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");

Are you sure your file opened properly? Did you check?
open (INFILE, "data.txt") or die "Couldn't open file: $!";

>       my $backgr_data=<INFILE>;
>
Reading from a filehandle in scalar context reads one line at a time. Sounds
like you want to slurp the whole file in at once, so you want
my @backgr_data=<INFILE>;

Paul

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