The OP does indeed want to test the value ("and with a true value"). The following would serve his needs:
$x{a} = 1 if !$x{a};
In reply to Re^2: &&= vivify keys?
by ikegami
in thread &&= vivify keys?
by oha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |