Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Replacing non ascii in string

by Athanasius (Monsignor)
on Jan 30, 2013 at 04:38 UTC ( #1015957=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    14:33 >perl -wE "my $s = 'Australia’s ‘Powder Capital’'; $s =~ tr/‘’/'
    +/; say $s;"
    Australia's 'Powder Capital'
    
    14:33 >
    
  2. or download this
    14:42 >perl -wE "my $t = 'and ... xxx said “This is a fantastic start 
    +to the season”'; $t =~ tr/“”/\"/; say $t;"
    and ... xxx said "This is a fantastic start to the season"
    
    14:43 >
    
  3. or download this
    14:46 >perl -wE "my $s = qq[Australia’s ‘Powder Capital’\nand ... xxx 
    +said “This is a fantastic start to the season”]; $s =~ tr/‘’“”/''\"\"
    +/; say $s;"
    Australia's 'Powder Capital'
    and ... xxx said "This is a fantastic start to the season"
    
    14:49 >
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015957]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2014-07-31 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls