in reply to Tying $@ - weird behavior

I'm not at all sure about this, but I believe Perl's special variables are more like aliases or place-holders to internal variables than normal scalars. That would explain this abnormality.

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:

print $|=5, ".\n"; __END__ 1.
The reason for this is that the C code that handles assignment to $| does something similar to:
if (value assigned to $| is true) return 1 else return 0;
This allows the following magic with $|:
print --$|, "\n" for 1 .. 10; __END__ 1 0 1 0 1 0 1 0 1 0
Again, all of this is just speculation ;)