If you want to check if it matched a 0-length string, try
if (length($a))
Altogether, it can be written as:
$a = 1 if not length $a;
or
$a = 1 if length $a != 0;
By the way, you shouldn't use $a and $b as variables. They mean something special to sort.
In reply to Re: if var isnt used
by ikegami
in thread if var isnt used
by metalfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |