I do agree that $|++ is unnecessarily clever, since it might confuse an ignorant maintenenance programmer, and that $| = 1 is clearer. But it's simply wrong to say that it could “bite you if $| doesn't happen to have the value you assume”. It couldn't, for reasons that will be obvious to anyone who has understood this thread.
In reply to Re^2: $| pre and post increment and deincrement behavior
by robin
in thread $| pre and post increment and deincrement behavior
by bioMan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |