C:\>perl -e "my $test = 'Hallo#Welt#sdf#asd#asd#'; print qq~yes\n~ if ($test =~ tr!#!!) == 5;" yes