in reply to using push
You might also add what version of Perl and what platform you're on; I don't see the error message Invalid value for shared scalar ... in my copy of perldoc perldiag for 5.6.1 or 5.8.6.