Help for this page

Select Code to Download


  1. or download this
    for (my $i=0;$i<@a;++$i){
        $b[$i] = $a[$i] - $a[$i+1];
    }
    
  2. or download this
    @b = map{$_ - $_+1}, @a;