in reply to Re: `cat $myfile`; vs. open(MYHANDLE, "myfile")
in thread `cat $myfile`; vs. open(MYHANDLE, "myfile")

Hmmm. No joy for either version. I'll try the while(<MYHANDLE>) approach tommorrow when I return to hit this problem again.

Thanks to you both for the suggestions.
  • Comment on Re^2: `cat $myfile`; vs. open(MYHANDLE, "myfile")

Replies are listed 'Best First'.
Re^3: `cat $myfile`; vs. open(MYHANDLE, "myfile")
by eff_i_g (Curate) on Aug 07, 2006 at 22:47 UTC
    What delimits the records in your file? What is the <STDIN> part doing?

    P.S. Use the three argument open if your perl supports it. You may also prefer to use a lexical an indirect filehandle also, e.g., open my $FILE, '<', $file or croak "Could not open '$file': $!";