Help for this page

Select Code to Download


  1. or download this
    map { print "$_\n" } (@array);
    
  2. or download this
    foreach (@array) {
       print "$_\n"
    }
    
  3. or download this
    @squares = map { $_ * $_ } (@array);
    
  4. or download this
    foreach (@array) {
       push @squares, $_ * $_
    }