Help for this page

Select Code to Download


  1. or download this
    sub scalarmap ($&@)
    {
    ...
    
    my @array = 1..10;
    my $sum = scalarmap 0, {  $a + $b } @array;
    
  2. or download this
      Array found where operator expected at scalarmap2.pl line 32, near "
    +} "
            (Missing operator before  ?)
    syntax error at scalarmap2.pl line 32, near "} @array"