What does $main::Counter{myvariable} do? I can't find any references to Counter or myvariable in any of the Perl files.
I've never found a need to use main::, though I've gone the other way around (ie to access a package's variables from main). Chances are you might be in a package, ie
[perl]
print $foo; # undef
Bar::quux();
print $foo; # should be 1
package Bar;
sub quux {
$main::foo = 1;
}
[/perl]
(that should work)
Sean