#! perl
use strict;

package FF;
use Tie::Scalar;
use base 'Tie::StdScalar';
sub FETCH {
	return $$_[0]++ & 1 ? 1 : 0;
}

package main;
my ($ff, $i);
tie $ff, 'FF';
for $i (1..500000) {
	my $j = $ff;
}
print "$ff";
print "$ff";
print "$ff\n";


