Help for this page

Select Code to Download


  1. or download this
    for(0..100){
        my $x = $tied;
        print $x->(5), "\n";
    }
    
  2. or download this
    print $tied->(5), $/;
    {
        print $tied->(10), $/;
    }
    
  3. or download this
    print $tied->(5), $/;
    $r->{subref} = sub { return 2 * $_[0] }; # This is a new anonymous sub
    +ref
    {
        print $tied->(10), $/;
    }
    
  4. or download this
    sub FETCH {
        my $r = shift;
    ...
    
        return $r->{subref} = $r->{subref};
    }