in reply to comparing element in arrays
You could try something like this:
Rough code, untested. Your data may allow some simplification.my %numbered; foreach my $string (@a) { for ($string =~ /(\d+)/g) { push @{$numbered{$_}}, $string; } } my @occurances; for (@b) { push @occurances, @{$numbered{$_}} if exists $numbered{$_}; }
After Compline,
Zaxo
|
|---|