This is because of a change in Perl 5.14:
Filehandle method calls load IO::File on demand
The OP's code does work in Perl 5.10, if you run it with the -MIO::Handle parameter to manually load the IO::Handle package.
In reply to Re^2: Unexpected behavior of function 'say'
by tobyink
in thread Unexpected behavior of function 'say'
by farang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |