$_ ="|Here|are|six|pipe|symbols|"; $pipecount = tr/|//; print $pipecount ,"\n", $_, "\n"; $pipecount = tr/|/~/; print $pipecount ,"\n", $_, "\n";