Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: replacing close-single-quote with apostrophe

by BillKSmith (Monsignor)
on Nov 08, 2021 at 15:34 UTC ( [id://11138576] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    $text =~ tr/\N{RIGHT SINGLE QUOTATION MARK}/\N{APOSTROPHE}/;
    
    is( $text, q(This isn't hard), 'quote mark test' );
    
  2. or download this
    1..1
    ok 1 - quote mark test