Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
chomp (my $choice = <STDIN>); if ($choice == 1) { &hash1; } elsif ($choice == 2) { &hash2; } elsif ($choice == 3) { &hash3; } else { print "ERROR: Please type in either 1, 2 or 3."; print "\nYou must restart the program"; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple loop
by revdiablo (Prior) on Mar 24, 2004 at 04:24 UTC | |
|
Re: simple loop
by Zaxo (Archbishop) on Mar 24, 2004 at 03:47 UTC | |
|
Re: simple loop
by jweed (Chaplain) on Mar 24, 2004 at 03:37 UTC | |
|
Re: simple loop
by spikey_wan (Scribe) on Mar 24, 2004 at 11:50 UTC | |
|
Re: simple loop
by davido (Cardinal) on Mar 24, 2004 at 08:35 UTC |