HTH,my $s = "-----%s----%a----%d--%s-%d---"; print $s =~ tr/%//, "\n"; print "$_\n" for ( $s =~ /%([ads])/g ); OUTPUT : 5 s a d s d
In reply to Re: Extracting the number of %'s in a string
by poolpi
in thread Extracting the number of %'s in a string
by mnranjeeth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |