in reply to Re: Go to perl::critic (updated)
in thread Go to perl::critic
Who cares what management thinks? Perl's goto LABEL is an awesome tool when one wants loop-like flow control outside of loops. It's the easy way to implement interactive shell scripts:
INPUT: print 'number> '; chomp(my $input = <STDIN>); if ($input and $input =~ /[0-9]+/) { print $input, "\n" } else { goto INPUT }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Go to perl::critic
by haukex (Archbishop) on Oct 06, 2019 at 18:36 UTC | |
by Anonymous Monk on Oct 07, 2019 at 02:26 UTC | |
by haukex (Archbishop) on Oct 07, 2019 at 09:13 UTC | |
by Anonymous Monk on Oct 07, 2019 at 14:11 UTC | |
|
Re^3: Go to perl::critic (goto considered awesome)
by Anonymous Monk on Oct 06, 2019 at 22:13 UTC | |
by Anonymous Monk on Oct 07, 2019 at 18:42 UTC |