package Foo; sub new { print "Right one!\n"; } 1; -------- #!/usr/local/bin/perl use Foo; # Insert 1000 lines of code here sub new { print "Wrong one!\n"; } # Insert 1000 lines of code here my $bar = new FOO; # Compare that with my $bar = FOO->new;