Update: What happens is that the main package is (ab)used as a class implementing a tied scalar for $". Whenever perl wants to use the value of the tied scalar $", it calls the object method FETCH instead, in this case, main::FETCH. And that method returns either "=" or "&", depending on how often it was called before. The modulo operator % switches between the two values with every call. To construct the object on which FETCH will be invoked, tie calls the TIESCALAR class method that returns a blessed reference to a scalar value, that value is used to count the calls inside FETCH.
Alexander
In reply to Re^3: Joining an array
by afoken
in thread Joining an array
by tangent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |