in reply to Grep reutrn the occurance of a pattern
$ 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
|
|---|