Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Is print faster than syswrite?

by belg4mit (Prior)
on Jan 29, 2009 at 05:47 UTC ( #739776=note: print w/replies, xml ) Need Help??


in reply to Re: Is print faster than syswrite?
in thread Is print faster than syswrite?

Actually, it acts on the currently select()d filehandle, which is generally STDOUT, but not always. That's why you still sometimes see the convoluted select((select(STDOUT),$|=1)[0]);

--
In Bob We Trust, All Others Bring Data.

Replies are listed 'Best First'.
Re^3: Is print faster than syswrite?
by ikegami (Pope) on Jan 29, 2009 at 07:23 UTC

    I know, I already said that. I wasn't making a general statement, I was talking about the variables in his program (STDOUT and FILE).

    And that convoluted bit? That's how autoflush does it too. (Well, a slightly safer variation.) I prefer to use autoflush cause it's way more readable.

      >I know, I already said that

      Aye. 5 minutes before I did (so please excuse the lag, it took me awhile to find the correct incantation), and in a different node :-P. The statement "$| = 1; only affects STDOUT, not FILE" doesn;t convey an understanding of this though, which was I mentioned it.

      --
      In Bob We Trust, All Others Bring Data.

        Oops, sorry, there was a much longer period between the time I wrote and the time I noticed your post.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://739776]
help
Chatterbox?
[Corion]: Do you want to launch a script and keep the command prompt/console window open?
[Corion]: Do you want to wait for a key press before closing the window?
[LanX]: I want the command line in the history
[tye]: -Mouse
[Corion]: Option a) would mean launching cmd.exe /k c:\path\to\ batchfile- launching-perl- script.cmd. Option b) would be to add pause as the last line of said batch file.
[LanX]: First day after holidays ... and already stressed by the fact that colleagues changed stuff without communication ... apparently I'm the only one trying to fight entropy
[Corion]: LanX: The command is always in the history if you typed it in before. If you didn't type the command into the command line, it will not be there. I think there is doskey which can stuff command lines into the history
LanX damns the cult of CB ;-)
LanX WTF WTF WTF
[LanX]: please forget my last 3 posts

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-03-27 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.