Good Afternoon Monks!
I am trying to accomplish the following in a more automated fashion. My code is below and here is the question: Based on if the truck is filled with which ever commodity I would like the second field to be automatically filled in with either being loaded or emptied.
print "==============\n\n"; print "| COMMODITY: |\n\n"; print "==============\n\n"; my $cmmdty = <STDIN>; $cmmdty = <STDIN> until defined $cmmdty; chomp $cmmdty; cls(); print "====================\n\n"; print "| LOADED OR EMPTY: |\n\n"; print "====================\n\n"; my $lore = <STDIN>; $lore = <STDIN> until defined $lore; chomp $lore; cls();
I know I need an if statement like below:
if ($cmmdty eq 'NONE') { print "E"\n"; } elsif { print "L"\n; }
Am I on the right track? I just need to be guided on to where to put the code to get the desired output I am looking for. Thanks in advance!
In reply to Auto Fill by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |