re line 8 for windows: perhaps con: or CON: (either appears to work on the rather dated W32 box available right now):
open STDIN, "<", "/con:" or die "Couldn't open console: $!";
To execute a command * found in $user_input simply insert
system($user_input);
after line 11 of almut's elegant no-module solution -- which observation is in no way intended to deprecate ikegami's earlier reply using a module which also appears to fit the OP's needs. Both are easily extensible./p>
Update: * ...but this fails with some commands, notably with cd or chdir, although it does "work" with commands like dir or perl -c script.pl.
In reply to Re^2: STDIN problemo
by ww
in thread STDIN problemo
by ccdoub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |