PriNet has asked for the wisdom of the Perl Monks concerning the following question:
This is a REALLY stupid question, but how come this does not just accept the keyboard input (with <enter> key) then immediately print it out, then quit. The script doesn't do the print and i can't stop it without using ^c
This is not on a webpage, it's using the perl interpreter directly; i.e. "perl input.pl" at the command prompt
print "type something: "; my($input) = <STDIN>; print "you typed ", $input;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Input problem with Enter key...
by davido (Cardinal) on Nov 07, 2016 at 01:02 UTC | |
by PriNet (Monk) on Nov 07, 2016 at 01:15 UTC | |
by davido (Cardinal) on Nov 07, 2016 at 02:00 UTC | |
by PriNet (Monk) on Nov 07, 2016 at 02:06 UTC | |
by kcott (Archbishop) on Nov 07, 2016 at 02:02 UTC | |
by PriNet (Monk) on Nov 07, 2016 at 02:11 UTC | |
by Marshall (Canon) on Nov 07, 2016 at 02:37 UTC | |
| |
by ww (Archbishop) on Nov 07, 2016 at 12:18 UTC |