Help for this page

Select Code to Download


  1. or download this
        sub apply (&@) {
            my $func  = shift;
    ...
        apply {uc} $var1, $var2;
        apply {abs} @values;
        # etc.
    
  2. or download this
        sub apply (&func, *@args) {
            $_ = func($_) foreach @args;
        }
    
  3. or download this
        sub apply (&func, *@args) {
            each(@args) = func(each @args);
        }