Help for this page

Select Code to Download


  1. or download this
    my @b;
    $b[ $_-1 ] = $a[ $_-1 ] - $a[ $_ ] for 1 .. $#a;
    
  2. or download this
    my @b;
    $b[ $_ ] = $a[ $_ ] - $a[ $_+1 ] for 0 .. $#a-1;
    
  3. or download this
    my @b = @a;
    $b[ $_ ] -= $b[ $_+1 ] for 0 .. $#b-1;
    pop @b;