Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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.

-sauoq
"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.

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-20 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found