- or download this
my $state = 'idle';
while ( my $input = <> ) {
...
elsif ( $state eq ...
else { die "internal error: bad state $state" }
}
- or download this
my $state = 'idle';
while ( my $input = <> ) {
...
elsif ( $input =~ ...
else { die "unknown input: $input" }
}
- or download this
use warnings;
use strict;
...
}
return \@outdata;
}