in reply to Re: searching for strings
in thread searching for strings
Tried that one also. It doesn't work either.
C:\test>perl my @d = qw(AAA30 BBC5 SHT12H DAL33B BBC49 AAA31 DAL33A BBC6 SHT12G BBC +50); my $last = ""; foreach my $v ( sort {$a cmp $b} @d) { my $l1 = $last; my $l2 = chop $l1; print "$last,$v\n" if $v eq $l1.++$l2; $last = $v; } ^Z AAA30,AAA31 DAL33A,DAL33B SHT12G,SHT12H
BBC5;BBC6 and BBC49;BBC50 are missing. Working out why is interesting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: searching for strings
by oha (Friar) on Aug 06, 2007 at 13:13 UTC | |
by FunkyMonk (Bishop) on Aug 06, 2007 at 14:16 UTC |