sub counttags() { $stag=0; $etag=0; while ($_ =~ /<\Q$_[0]>/g) {$stag++} while ($_ =~ /<\/\Q$_[0]>/g) {$etag++} if($stag != $etag) { print "Number of Start and End tags for element $_[0] does not m +atch"; } }
In reply to Re: Counting the start and end elements in a line
by rminner
in thread Counting the start and end elements in a line
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |