Josh:

The problem only occurs under Apache::ASP,
but works wonderfully in a pure perl environment.

Steve


-----Original Message-----
From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 3:15 PM
To: Stephen Bardsley
Cc: [EMAIL PROTECTED]
Subject: Re: intermittent failure reading a file


Stephen Bardsley wrote:
> 
> my $wfname = 'a session based filename';
> my $csv = Text::CSV->new();
> my @fft = ();
> my @line = ();
> 
> open(IN, "./fft <$wfname |") or die "could not open $wfname";
> while (<IN>) {
>   $csv->parse($_);
>   @line = $csv->fields();
>   push(@fft, $line[0]);
> }
> close(IN);
> 

I don't know that while(<IN>) is a good idea,
I wonder what would happen if somehow a line
was blank, would that be boolean 0 ?  Try 
instead:  for(<IN>), or even

 my @lines = <IN>
 for ( @lines ) {

-- Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks <- Web Link Checking          Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to