Help for this page

Select Code to Download


  1. or download this
    say "hello, world";
    
  2. or download this
    sub addprint ($n,$m) { say $n+$m }  # ?
    
  3. or download this
    sub addprint {my $sum = 0; $sum += $_ for @_; print $sum, "\n"}
    
  4. or download this
    sub addprint (*@num) { say [+] @num };
    
  5. or download this
    sub addprint {say [+] @_}
    
  6. or download this
    my %loops = (while => 'handles', for => 'lists');
    
  7. or download this
    for =$fh { ... }
    for @array { ... }