Help for this page

Select Code to Download


  1. or download this
    @test = (23,23,4,8,21,90,90,90,90,2,2,2,19,21,19);
    map {
    ...
        $last = $test[$_ - 1];
        $runlengths[$run] = [$test[$_ - 1], $length];
    } (1 .. scalar @test);
    
  2. or download this
    @strings = map { 
    $runlengths[$_][0] . "x" . $runlengths[$_][1] } ( 1 .. $#runlengths);
    
  3. or download this
    sub extract{
        my $index = shift;
    ...
        }
        return undef;
    }