in reply to Tying $@ - weird behavior
A good example (the only one I know of, really) is $|. It can assume only the values of 0 or 1, irrespective of what you try to set it to:
The reason for this is that the C code that handles assignment to $| does something similar to:print $|=5, ".\n"; __END__ 1.
This allows the following magic with $|:if (value assigned to $| is true) return 1 else return 0;
Again, all of this is just speculation ;)print --$|, "\n" for 1 .. 10; __END__ 1 0 1 0 1 0 1 0 1 0
|
|---|