Help for this page

Select Code to Download


  1. or download this
    use tahash;
    my %hash = (
    ...
                  "Mar" => 3,
               );
    my $val = tie(%hash,"tahash") or die "Can't tie : $!";
    
  2. or download this
    package tahash;
    sub TIEHASH {
    ...
       print "In TIEHASH .... \n";
       return bless(\%hash);
    }
    
  3. or download this
    <tahash
    >In TIEHASH ....
    The object is destroyed...
    
  4. 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";
    
  5. or download this
    package tahash;
    
    ...
    }
    
    1;
    
  6. or download this
    X:\>perl 1221948.pl
    @_ = (
    ...
    The object is destroyed...
    
    X:\>
    
  7. or download this
    package tahash;
    
    ...
    }
    
    1;
    
  8. or download this
    X:\>perl 1221949.pl
    $val = bless( {}, 'tahash' );
    ...
    The object is destroyed...
    
    X:\>