zachlipton has asked for the wisdom of the Perl Monks concerning the following question:
This runs fine as long as I enter a valid database type (as defined in @databases), but if I enter something invalid, instead of goto'ing back to the call to ask() again, I get this: Can't find label ASK_DATABASE at Conf/NewConfiguration.cm line 49, <STDIN> line 7. If anyone has a recomendation on how best to fix this, it would be great.ASK_DATABASE: ask('databasetype','Database type?','mysql'); my $found = undef; foreach $cur (@databases) { if (getConf('databasetype') eq $cur) { $found = 1; last; } } unless ($found) { output "Sorry, invalid option\n\n"; goto ASK_DATABASE; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: On goto
by merlyn (Sage) on Mar 01, 2003 at 01:55 UTC | |
by Aristotle (Chancellor) on Mar 01, 2003 at 13:11 UTC | |
by merlyn (Sage) on Mar 01, 2003 at 15:48 UTC | |
by Aristotle (Chancellor) on Mar 01, 2003 at 16:04 UTC | |
by zachlipton (Beadle) on Mar 01, 2003 at 02:02 UTC | |
by merlyn (Sage) on Mar 01, 2003 at 02:05 UTC | |
by djantzen (Priest) on Mar 01, 2003 at 06:23 UTC | |
by merlyn (Sage) on Mar 01, 2003 at 06:32 UTC | |
by Anonymous Monk on Mar 01, 2003 at 16:04 UTC | |
|
Re: On goto
by Jenda (Abbot) on Mar 01, 2003 at 19:22 UTC | |
|
Re: On goto
by hgolan30 (Initiate) on Mar 01, 2003 at 10:46 UTC |