in reply to Re^3: Redirecting"enter" when an external command is running..
in thread Redirecting"enter" when an external command is running..
I changed the order of the program execution to resolve this problem but i have one more question now...I am doing a check on $choice for value 1 or 2 ,if not print "INVALID CHOICE" and then exit the program.Is there a way to ask the user to re-enter the choice rather than exiting the program?
print "\nEnter your choice: "; my $choice = <>; chomp ($choice); if($choice != (1||2)){ print "/*******************************************************/\n +"; print "INVALID CHOICE\n"; print "/*******************************************************/\n +"; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Redirecting"enter" when an external command is running..
by ww (Archbishop) on Dec 05, 2010 at 02:52 UTC | |
by perl_mystery (Beadle) on Dec 05, 2010 at 06:27 UTC |