$NEXTDAY is NOT the same variable as $nextday. The following example uses strings as the values in the variables, but using numeric values (with appropriate adjustment of the test at Ln 8) would provide a similar demonstration.
#!/usr/bin/perl use 5.014; # 987079 my $NEXTDAY = "fooday"; my $nextday = "BARDAY"; if ($NEXTDAY eq $nextday) { say "Behold, a miracle!"; } else { say "\$NEXTDAY is $NEXTDAY and \$nextday is $nextday"; }
If you used the == test at Ln 8, you would observe an apparent miracle... but only because an == test checks for numeric equality... even when applied to non-numerics (eg, strings).
In reply to Re^3: Using Sendmail - how can I active use defined variables in the Message Body
by ww
in thread Using Sendmail - how can I active use defined variables in the Message Body
by CoffeeDuke
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |