For example, to count the appearance of character ':' in a string --
my $str = "a:b:c:d:e:f:g";
my $count = ($str =~ tr/://);
print $count, "\n";
The output will be 6.
Monday, June 17, 2019
Subscribe to:
Post Comments (Atom)
... and Thoughts
No comments:
Post a Comment