Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Ask for STDIN but don't pause for it

by PhillyR (Acolyte)
on Sep 29, 2011 at 19:44 UTC ( #928655=note: print w/replies, xml ) Need Help??


in reply to Re: Ask for STDIN but don't pause for it
in thread Ask for STDIN but don't pause for it

I tried using the third example (IO::Select). However, this just ends up being an infinite loop printing the time. It never gets to reading STDIN.
  • Comment on Re^2: Ask for STDIN but don't pause for it

Replies are listed 'Best First'.
Re^3: Ask for STDIN but don't pause for it
by zentara (Archbishop) on Sep 30, 2011 at 10:59 UTC
    Works here. Are you hitting Enter to finish the line input? Otherwise use sysread.
    $ ./928062.pl
    Fri Sep 30 06:56:53 2011
    Fri Sep 30 06:56:58 2011
    asdfasfsad
    GLOB(0x7afe00)
    got: asdfasfsad
    Fri Sep 30 06:57:02 2011
    ^C
    

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

      same problem sysread doesn't solve. It seems a matter of not blocking can_read. Did you manage to have it working?

        It works on Linux, it doesn't on Windows XP. Do you know why? thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928655]
help
Chatterbox?
[holli]: yeah, then vroom will personally stab me in the back at night
[holli]: exactly, moritz
[moritz]: with a big table of redirects to support the old links
[LanX]: do it
[holli]: well if you put some cleverness into the migration you can auto convert most of the links as well
[LanX]: Let's Make PerlMonks Great Again!
[holli]: but you know what? i don't think i'd fancy that. I like PM as it is.
[holli]: Alone the chatterbox and everybody writes his own cb client tradition
[LanX]: there was a guy who tried to steal the concept and build an own monastery ...
[LanX]: yeah PM is very emacsy ;-)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2017-11-20 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?