Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl -l
    
    ...
    @array = map { $_ == 0 ? ++$zeros && () : $_ } @array;
    unshift @array, (0) x $zeros;
    print "@array";
    
  2. or download this
    1 2 3 4 2 1 2 0 1 0 0
    0 0 0 1 2 3 4 2 1 2 1