Hello! I won't lie, I'm new to Perl.
I'm trying to switch variables in perl from '1' to '0', and somtimes '2', but it's not working correctly
here's how I think a switch should be preformed:
I think that's wrong, though. I get no error messages, but the output can be drastically different from what I want.
ex:
At one point, it started printing the number.
assistance would be greatly appreciated
I'm trying to switch variables in perl from '1' to '0', and somtimes '2', but it's not working correctly
here's how I think a switch should be preformed:
Code:
if ($input eq "switch them"){
$variable == 1;
ex:
Code:
if ($input eq "switch them"){
$variable == 1;
print "I have switched the variable\n";
assistance would be greatly appreciated
Comment