http://qs321.pair.com?node_id=11119839

nysus has asked for the wisdom of the Perl Monks concerning the following question:

This doesn't work. No idea why:

#! /usr/bin/env perl use strict; use warnings; my $string = "“can’t”"; $string =~ tr/“’”/"'"/; print $string . "\n";

Result: "'"can"'"t"'"

Desired result: "can't"

I reread the documentation for tr///. But it still seems like every character on left should be replace with a single corresponding character on the right. What am I missing?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks