use_tahash.pl use tahash; my %hash = ( "Jan" => 1, "Feb" => 2, "Mar" => 3, ); #my $val = tahash->new(\%hash); my $val = tie(%hash,"tahash") or die "Can't tie : $!"; tahash.pm --------- use strict; use warnings; package tahash; #sub new { # my $class = shift; # tie my %ref, $class; # bless \%ref, $class; # } sub TIEHASH { print "<@_ \n>"; my $class = shift; my %hash = @_; print "In TIEHASH .... \n"; return bless(\%hash); } sub DESTROY { print "The object is destroyed...\n"; } 1;