How can I count characters in Perl?

后端 未结 4 460
长发绾君心
长发绾君心 2021-01-11 12:09

I have the following Perl script counting the number of Fs and Ts in a string:

my $str = \"GGGFFEEIIEETTGGG\";
my $ft_count = 0;
$ft_count++ while($str =~ m/         


        
4条回答
提交回复
热议问题