I am using a windows box with the latest version of ActivePerl installed from the following website ActiveState and I am having an issue with a really simple concept of Less Than ‘<‘.
I have the following code:
#!/usr/local/bin/perl
use warnings;
use strict;
my $a = 1;
if(1 < $a)
{
print "true";
}
When I execute the script in a command prompt, “true” never prints out. What simple logic am I missing here? I have used this expression plenty of times in C++, C# and java but for some reason it is not working here.
If I missed something simple, please be nice. I have spent quite a bit of time wondering whats going on.
Thank you,
Wesley
Um… if $a is 1, the condition is false, and “true” will not print. Did I miss something?