Help for this page

Select Code to Download


  1. or download this
    
    use B::Deparse;
    ...
    
    print "@out\n";
    
  2. or download this
    # some code references
    $f1 = sub {map {$_ + 1} @_};
    $f2 = sub {map {log($_)} @_};
    $f3 = sub {map {$_ * 3} @_};
    
  3. or download this
     # combined transform
    sub trans1 {&$f3(&$f2(&$f1))};
    
    ...
    @trans = trans1(@data);
    
    print "@trans\n";
    
  4. or download this
    # make a sequence array
    @seq = ($f1, $f2, $f3);
    ...
    @trans = trans2(@data);
    
    print "@trans\n";