$ perl -le ' > $str = q{adasdGTsaJsdfsCFwee}; > $capsCt = @caps = $str =~ m{([A-Z]+)}; > print qq{Found: $capsCt}; > print for @caps;'
produces
Found: 3 GT J CF
I hope this is helpful.
Cheers,
JohnGG
In reply to Re: Grep reutrn the occurance of a pattern
by johngg
in thread Grep reutrn the occurance of a pattern
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |