Doug_H has asked for the wisdom of the Perl Monks concerning the following question:
I would like to use $io->autoflush(1)from IO::Handle. Unfortunately it looks like in perl v5.10.0 it is not included in the core module. It works fine with version 5.16.2.
Therefore I have 2 questions and hopefully you can help me.
1) Which perl version did add autoflush to the default core module?
2) How can I implement it that it is activated when the method is there. Something like this …
if (v.5.x.x. or higher) } $io->autoflush(1); }
For any other ideas how I can solve that it works with 5.10.0 and all newer versions I would be very happy - thanks.
Thanks for your help.
Kind regards
Doug EDIT: Sorry ... it looks like that it works when I add use IO::Handle;. It is not necessary with version 5.16.2 but required for 5.10.0 ?! Any idea why the different behaviour?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: $io->autoflush - which perl version?
by choroba (Cardinal) on Mar 27, 2016 at 19:53 UTC | |
|
Re: $io->autoflush - which perl version?
by Anonymous Monk on Mar 27, 2016 at 19:53 UTC | |
|
Re: $io->autoflush - which perl version?
by zwon (Abbot) on Mar 27, 2016 at 21:49 UTC | |
|
Re: $io->autoflush - which perl version?
by stevieb (Canon) on Mar 27, 2016 at 19:50 UTC |