Help for this page

Select Code to Download


  1. or download this
    package Foo;
    
    ...
        my $arg  = shift;
        return join( ' ', ($self->{val}) x $arg );
    }
    
  2. or download this
    my $f = Foo->new('doot');
    my @meth = (qw(zug zwang));
    ...
    
    my $m = $meth[rand @meth];
    print $f->$m(3), $/;
    
  3. or download this
    my $f = Foo->new('doot');
    
    ...
    my @meth = (\&Foo::zug, \&Foo::zwang);
    
    print $f->${\$meth[rand @meth]}(3);