in reply to OO confusion

You'll have to paste more code. I used the following and it works perfectly (removing the second spurious my, which doesn't work):
#!/usr/bin/perl -w use strict; package Foo; sub new { bless({}, $_[0]); } package main; my $foo = new Foo; $foo = new Foo;