in reply to Re^3 Input/Output through the Keyboard
in thread Input/Output through the Keyboard
eval() is part of the standard distribution of PERL.
If you wanted to allow the program to keep running until the user exits you could use something like this:
If you make something idiot-proof, eventually someone will make a better idiot.
I am that better idiot.
If you wanted to allow the program to keep running until the user exits you could use something like this:
That seemed to work on my system.#!/usr/bin/perl $| = 1; while( ) { print "Number, plz: "; $input = <>; chomp $input; print "\nOutput is: ", ( ($input*2)-1 ), "\n"; }
If you make something idiot-proof, eventually someone will make a better idiot.
I am that better idiot.
|
---|
In Section
Seekers of Perl Wisdom