Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: STDIN refuses input

by Khen1950fx (Canon)
on Dec 16, 2013 at 04:29 UTC ( #1067281=note: print w/ replies, xml ) Need Help??


in reply to Re: STDIN refuses input
in thread STDIN refuses input

You could test STDIN on your local computer using CGI::Capture. Try this:

#!perl -lw use strict; use CGI (); use CGI::Capture (); print "What is your name?"; sleep 5; SCOPE: { my $input = <STDIN>; chomp $input; my $input_ref = \$input; if ( CGI::Capture->_stdin($input_ref) ) { print "Hello, $input" or die $!; } }


Comment on Re^2: STDIN refuses input
Select or Download Code
Replies are listed 'Best First'.
Re^3: STDIN refuses input
by GrandFather (Sage) on Dec 16, 2013 at 06:04 UTC

    I'm not sure what you think that does, and I'm pretty sure it doesn't do what the OP wants, and I absolutely know that it's not testing STDIN in any way I think the OP is interested in. Aside from all that, I'm not the person interested in doing the testing.

    True laziness is hard work

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2015-07-29 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls