Help for this page

Select Code to Download


  1. or download this
    $ perl -Mstrict -Mwarnings -E '
    > my $text =
    ...
    > substr $text, $_, 0, q{-} for reverse @cums[ 1 .. $#cums ];
    > say $text;'
    20130204000000000-068100-8361002201306810020022013068800-020-049-4
    
  2. or download this
    perl -Mstrict -Mwarnings -E '
    my $text =
    ...
    push @cums, $_ + $cums[ -1 ] for @offs;
    substr $text, $_, 0, q{-} for reverse @cums[ 1 .. $#cums ];
    say $text;'