Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re: Re: Re: Re: Perl Idioms Explained - $|++

by sauoq (Abbot)
on Aug 01, 2003 at 23:51 UTC ( [id://280191]=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Perl Idioms Explained - $|++
in thread Perl Idioms Explained - $|++

My only reservation was of the practice of using IO->Handle only for the purposes of turning on autoflush.

I agree. I said "longer scripts" and most of my longer scripts already pull use IO::Handle somewhere along the line anyway. I probably should have said that it's not a good idea to use it just for autoflush.

"My two cents aren't worth a dime.";
  • Comment on Re: Re: Re: Re: Perl Idioms Explained - $|++

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Perl Idioms Explained - $|++
by BrowserUk (Patriarch) on Aug 02, 2003 at 00:08 UTC

    Here's intriguing:) ??

    perl -e"autoflush STDOUT, 1;" Can't locate object method "autoflush" via package "IO::Handle" at -e +line 1.

    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

      This will clear that up some:

      $ perl -le 'print ref *STDOUT{IO}' IO::Handle

      The note in the BUGS section of the IO::Handle pod is explanatory too:

      BUGS Due to backwards compatibility, all filehandles resemble object +s of class "IO::Handle", or actually classes derived from that class +. They actually aren't. Which means you can't derive your own class f +rom "IO::Handle" and inherit those methods.

      "My two cents aren't worth a dime.";

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://280191]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-06-25 02:29 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.