Help for this page

Select Code to Download


  1. or download this
    sub do_something_with { print "@_\n"; }
    my @elements = qw( a b c d e f g );
    ...
    for my $i ($n-1 .. $#elements) {
      do_something_with(@elements[($i-($n-1))..$i]);
    }
    
  2. or download this
    a b c
    b c d
    c d e
    d e f
    e f g
    
  3. or download this
    a b c d
    b c d e
    c d e f
    d e f g