#!/usr/bin/perl -w use strict; package Foo; sub new { bless({}, $_[0]); } package main; my $foo = new Foo; $foo = new Foo;