Thanks reasonablekeith!!print("Type R to re-enter the values or Type E to exit:\n"); $value=<STDIN> if ($value="R") { goto line 1 } elsif($value="E") { exit(); } else { print("Invalid entry, try again:\n"); goto line 1 } }
Edited by Arunbear: Changed title from 'Goto', as per Monastery guidelines
In reply to Advice on goto usage? by imperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |