Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
       splice(@tmp, $_, 0, 'N') for reverse @positions;
       print(join(',', @tmp), "\n");
    }
    
  2. or download this
    while (my (@positions) = $i->()) {
       my @tmp;
    ...
       push @tmp, @arr[$cur..$#arr];
       print(join(',', @tmp), "\n");
    }
    
  3. or download this
    while (my (@positions) = $i->()) {
       my $sep = '';
    ...
       print($sep, $arr[$cur++]) while $cur < @arr;
       print("\n");
    }