[tpm] Filehandle $fh opened only for output at ....

zoffix at zoffix.com zoffix at zoffix.com
Tue May 2 17:43:20 PDT 2017


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