- or download this
use tahash;
my %hash = (
...
"Mar" => 3,
);
my $val = tie(%hash,"tahash") or die "Can't tie : $!";
- or download this
package tahash;
sub TIEHASH {
...
print "In TIEHASH .... \n";
return bless(\%hash);
}
- or download this
<tahash
>In TIEHASH ....
The object is destroyed...
- or download this
#!/usr/bin/perl
use strict;
...
my $val = tie(%hash,"tahash") or die "Can't tie : $!";
print Data::Dumper->new([$val],['val'])->Dump(),"\n";
print Data::Dumper->new([\%hash],['*hash'])->Dump(),"\n";
- or download this
package tahash;
...
}
1;
- or download this
X:\>perl 1221948.pl
@_ = (
...
The object is destroyed...
X:\>
- or download this
package tahash;
...
}
1;
- or download this
X:\>perl 1221949.pl
$val = bless( {}, 'tahash' );
...
The object is destroyed...
X:\>