<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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -