[tpm] Filehandle $fh opened only for output at ....
Tom Legrady
legrady at gmail.com
Tue May 2 19:28:23 PDT 2017
I have ',', I read hundreds of MB of data from the one file, dozens of
MB from the other.
You're right, It SHOULD be 'defined', so that reading a zero or an empty
string doesn't break out of the loop. But I don't THINK that would cause
this error.
Some of the files contain "version control comments" dated to '92, '93
... so they may have started as Perl4 ... stylistically it's believable
of some of the code. But I am here to baptize and purify and lead the
code to salvation.
Tom
On 2017-05-02 08:43 PM, zoffix at zoffix.com wrote:
>
> Quoting Tom Legrady <legrady at gmail.com>:
>
>> I've got an old, bad program running under Perl 5.6.1
>
> Wow! I didn't even know they made Perl that old! :)
>
>> The code looks like
>> while ( my $bug = <$fh> ) {
>
> As I recall the idiom is `while (defined(my $foo = <$fh>))`
>
> Are you *sure sure* it's actually opened for output? What's your open
> line? It should have `<` for mode, not `>`
>
>
> Cheers,
> ZZ
>
>
>>
>>
>> Tom
>> _______________________________________________
>> toronto-pm mailing list
>> toronto-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/toronto-pm
>
>
>
More information about the toronto-pm
mailing list