my $this = {}; print ref $this; # prints HASH bless $this; print ref $this; # prints main, or Foo if you used: bless $this, FOO