- or download this
# simple menu/input collection
enter word: foo
you entered <foo>
enter word: q
quitting...
- or download this
sub check_input {
my $input = shift;
...
print 'not recognized';
}
}
- or download this
sub check_input {
my ($type, $input) = @_;
...
}
# etc, etc
}
- or download this
while(1) {
my $input = <>;
...
if ($input eq 'b') {
goto BREAK:
}
- or download this
my @working = (1 .. 10);
# globally scoped anonymous coderef
...
if ($input eq 'p') {
$pop->();
}
- or download this
sub check_input {
my ($input, $opts_href) = @_;
...
SOMESPOT:
...
}