Help for this page

Select Code to Download


  1. or download this
    use strict; use warnings;
    sub f{ return $_[0] + 1 };
    my @a = (1, 2, 3);
    print join " ", map (f($_), @a);
    
  2. or download this
    $ perl -e 'print join " ", map {$_ + 1} 1..4'
    2 3 4 5