package myHash; sub new { bless {}, shift } sub AUTOLOAD { # next two lines just to see what's happening... print '@_ = ('.join(', ',map{"'$_'"}@_), ")\n"; print "\$AUTOLOAD = $AUTOLOAD\n"; my ($self,$value) = @_; (my $key = $AUTOLOAD) =~ s/.*:://; $self->{$key} = $value if $value; $self->{$key}; } 1;