Output is#! /usr/bin/perl use strict; use warnings; my $n = "ABCDABDIDAOFOOFAA" ; my $d = ($n =~ /A/g) ; print "matches $d" ;
In this example I try to find out how many A's are present in the string.matches 1
In reply to how to count matches by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |