http://qs1969.pair.com?node_id=632954

Thanks alot dogz007

You are very nice

your explanations are very clear, and you explained to me in every details

Just a few words to turn your attention on the following point : -- is not magical, contrary to ++

So, instead of decrementing @two, I have incremented twice @one

So I had to make some little modifications to your proposition, which is already very good

#! /usr/bin/perl use strict; while (my $line = <DATA>) { chomp $line; my @line = split ";", $line; next if $line[0] eq $line[1]; next unless length $line[0] == length $line[1]; my @one = breakup($line[0]); my @two = breakup($line[1]); my $one_incremented; my @One_Incremented = @one; foreach $one_incremented(@One_Incremented){ ++$one_incremented; } next unless scalar(@one) == scalar(@two); print STDOUT "one vaut : @one and two vaut : @two\n"; my @match = map { $one[$_] eq ++$two[$_] || ++$One_Incremented[$_] + eq $two[$_] ? 1 : 0 } (0..$#one); print STDOUT "match vaut @match\n"; print $line, "\n" if 1 == grep {$_} @match; } sub breakup { my @out; while ($_[0]) { $_[0] =~ s/^([a-zA-z]|[0-9]+)//; push @out, $1; } return @out; }

interesting topics: 674374 How would I sort a two-dimensional array by multiple columns? (with excel)

679296 : Date sorting

#128077 : Module installation