note
steves
<p>
That code doesn't compile. <b>TEST</b> starts with double
quotes and ends with a single quote. If I fix that, this
works as expected for me. Here's a version you can run
with your <b>$x</b> argument given on the command line:
<code>
use strict;
my $x = shift(@ARGV);
my $a = "TEST";
if ($x == 1) {
$a = "one";
} elsif ($x == 2) {
$a = "TWO";
} else {
$a = "EMPTY";
}
print "a=$a\n";
</code>
</p>
94007
416272