Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Input/Output through the Keyboard

by pg (Canon)
on Nov 13, 2002 at 06:19 UTC ( [id://212500]=note: print w/replies, xml ) Need Help??


in reply to Input/Output through the Keyboard

(Looks like the server is not working properly at this moment, it is not taking posts, try again).I cooked a little bit:
while (<STDIN>) { chomp; if ($_ eq "quit") { exit; } print eval "$_", "\n"; }
Sample input output would be: (user in put in red, output in blue):
$a=2
2
$a+3
5
($a+5)*2
14
quit

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found