perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <jos...@chamas.com>
Subject Re: intermittent failure reading a file
Date Fri, 15 Jun 2001 19:14:39 GMT
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: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message