in reply to Normal handles as IO::Handle

Can anyone tell me when this feature got included into Perl so I know how downward compatible my code will be?

Since Perl 5.4 (1997)

Now I wrote some code and tests and figured out that normal file handles seems to be already IO::Handle objects, even without 'use IO::Handle'.

Yes, but you do need to use IO::Handle; to load the methods if you want to use them.

>perl -e"STDOUT->print('');" Can't locate object method "print" via package "IO::Handle" at -e line + 1.

Replies are listed 'Best First'.
Re^2: Normal handles as IO::Handle
by mscharrer (Hermit) on Apr 18, 2008 at 10:55 UTC
    I knew that. My idea is that I have use IO::Handle in my module and the user scripts can just pass *STDIN or any other handle without knowing about IO::Handle.