Here is the code that I currently have. Running on Perl v5.8.9.
#!/usr/bin/perl
# Prompts the user for their desired configuration
print "\n";
print "Please type BB for breadboard, or ACU for the Audio Control Unit.\n";
print "Do you want a BB or ACU version of alarm programmer: ";
$a = <STDIN>;
if($a == "ACU"){
print("Initiating alarm programmer for ACU...\n");
}else{
print("Initiating alarm programmer for breadboard...\n");
}
Here is some sample output:
C:\Users\U157280\Documents\Alarm Programmer>PerlAutonomy.pl
Please type BB for breadboard, or ACU for the Audio Control Unit.
Do you want a BB or ACU version of alarm programmer: ACU
Initiating alarm programmer for ACU...
And another one:
C:\Users\U157280\Documents\Alarm Programmer>PerlAutonomy.pl
Please type BB for breadboard, or ACU for the Audio Control Unit.
Do you want a BB or ACU version of alarm programmer: BB
Initiating alarm programmer for ACU...
As you can see, it selects ACU
for both even though the statements appear to be correct.
What am I doing wrong?