As far as I could deduce from your description, the following should do:
# values to be used in an array ... my @array= map /\bkingdom\|([^|]+)\|/g, <>; # and stored in a hash as individual keys my %hash; $hash{$_}++ for @array; # show: print map "kingdom $_ was $hash{$_} x <br />\n", keys %hash;
Regards
mwa
In reply to Re: capturing separately
by mwah
in thread capturing separately
by ada
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |