| 1 | #!/usr/bin/env perl | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 37 | ▶ | use Modern::Perl; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 37 | ▶ | use ZX81::Tape qw(make_p); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 37 | ▶ | use Getopt::Std; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 37 | my $USAGE = "Usage: $0 [-o output_file.p] input_file.bas\n"; | |||||||||||||||||||
| 8 | 37 | ▶ | getopts( 'o:', \my %opts ) or die $USAGE; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 9 | 37 | ▶ | @ARGV == 1 or die $USAGE; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 10 | 37 | my $input_file = shift @ARGV; | |||||||||||||||||||
| 11 | my $output_file = $opts{o} | ||||||||||||||||||||
| 12 | 0 | ▶ | // do { my $f = $input_file; $f =~ s/\.bas$/.p/; $f }; | ||||||||||||||||||
|
Condition33%1/3
$opts{"o"} // do {
my $f = $input_file;
$f =~ s/\.bas$/.p/u;
$f
}
MC/DC0%0/2
$opts{"o"} // do {
my $f = $input_file;
$f =~ s/\.bas$/.p/u;
$f
}
$opts{"o"}
do {
my $f = $input_file;
$f =~ s/\.bas$/.p/u;
$f
}
Truth table33%1/3
A // B
A= $opts{"o"}B= do {
my $f = $input_file;
$f =~ s/\.bas$/.p/u;
$f
}
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 37 | make_p( $input_file, $output_file ); | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | __END__ | ||||||||||||||||||||