Help for this page

Select Code to Download


  1. or download this
      my @new = split //, $new;
      my $longer = (@cold > @new) ? $#cold : $#new;
    
  2. or download this
      my @cnew = split //, $new;
      my $longer = (@cold > @cnew) ? $#cold : $#cnew;
    
  3. or download this
      substr ($old, subscr, 0) = $span;
      substr ($new, subscr, 0) = $span;
    
  4. or download this
      substr ($old, $subscr, 0) = $span;
      substr ($new, $subscr, 0) = $span;
    
  5. or download this
      my $losubscr; #two subscripts because differ len of new and old
      my $lnsubscr; 
    ...
      substr ($new, $lnsubscr, 0) = $espan;
      substr ($old, subscr, 0) = $span;
      substr ($new, subscr, 0) = $span;
    
  6. or download this
      my $lsubscr;
      @cold = reverse @cold;
    ...
      substr $new, $lsubscr, 0, $espan;
      substr $old, $subscr, 0, $span;
      substr $new, $subscr, 0, $span;
    
  7. or download this
    while ( defined( my $first = <DATA> ) && defined( my $second = <DATA> 
    +) ) {
        print spandiffstr( $first, $second );
    ...
        return $old, $new;
        }