in reply to how can i align two two strings
use strict; use Algorithm::LCSS qw( LCSS ); use Data::Dump qw /dump/; my @first_sequence = (1,2,3,6,7,9,1,-7,2,6); my @second_sequence = (7,6,7,9,12,-22,-3); my $lcss_ary_ref = LCSS( \@first_sequence, \@second_sequence ); {local $" = ','; print "The aligned sequence is @$lcss_ary_ref\n";}
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how can i align two two strings
by Anonymous Monk on Dec 10, 2007 at 07:29 UTC | |
by poolpi (Hermit) on Dec 10, 2007 at 13:10 UTC |