<STDIN> not working during while - Perl -
i wrote small script, attempting write calculator, test know, have problem, want read <stdin>
in while loop, , freezes till kill ctrl + c
.
the weird thing, works in eclipse console, else.
relevant code:
require term::screen::uni; use strict; ... sub basiccalc(){ $scr = new term::screen::uni; $scr->clrscr(); print("basic calculator - type information options!\r\n"); while($input == "1\n"){ bcopr(); } $scr->clrscr(); main(); } sub bcopr(){ $inp = <>; if($inp eq "help\n"){ $input = 0; } }
Comments
Post a Comment