# test.pl use strict; package Foo; sub new{ return bless {}, shift; } sub foo{ my $self = shift; print "Foo called\n"; } package main; # print the full symbol table, notice the Foo:: entry print "$_ => $::{$_}\n" foreach keys %::; print "\n\n"; delete $::{'Foo::'}; # shouldn't this delete the symbol table for Foo? # print again the full symbol table, notice Foo:: is gone. print "$_ => $::{$_}\n" foreach keys %::; print "\n\n"; # seems still there. print "$_ => $Foo::{$_}\n" foreach keys %Foo::; print "\n\n"; # but can't call the following, as expected my $f = new Foo(); $f->foo();