in reply to Re: Parsing a string
in thread Parsing a string
Yeah this was a really clean solution. Very nicely done.
I was going to suggest something more complicated like the below for subtracting uniques. But you would have had to do it for each data type.
# CODE for finding a number field of a certain length if (my @matches = $datainstring =~ m{ ([0-9]{12}) }xmsg) { print qq{matched @matches};push(@match2, @matches);foreach my $elem + ( @match2 ) {next if $seen{ $elem }++;push @unique, $elem;}### GET U +NIQUES ##### } # IF #
|
|---|