In a real program, the $name gt 'fred' could be a long, expensive expression, whose value is needed more than once. Or the comparison between $name and 'fred' and if statement has some code between it, code that may, or may not modify $name.
Abigail
In reply to Re: Using scalar values as conditionals
by Abigail-II
in thread Using scalar values as conditionals
by amarceluk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |