Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Replacing non ascii in string

by Athanasius (Prior)
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 lurking in the Monastery: (6)
As of 2014-07-14 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls