Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: PERL UNIX and strangeness and char conversion

by Anonymous Monk
on Jan 18, 2021 at 21:55 UTC ( #11127076=note: print w/replies, xml ) Need Help??


in reply to Re: PERL UNIX and strangeness and char conversion
in thread PERL UNIX and strangeness and char conversion

OK! I THINK I GET IT perl -pe 'tr/\x93-\x94/"/' <INFILE >OUTFILE Inserts the " perl -pe 'tr/\x97/,/' <INFILE >OUTFILE Inserts the , perl -pe 'tr/\x91-\x92/'/' <INFILE >OUTFILE Croaks. If I insert "\" to escape the second ' IT STILL CROAKS! What is special about \x91 and \x92 in the above statement? At least I made progress this time...

  • Comment on Re^2: PERL UNIX and strangeness and char conversion

Replies are listed 'Best First'.
Re^3: PERL UNIX and strangeness and char conversion
by tybalt89 (Prior) on Jan 18, 2021 at 22:11 UTC

    The bash shell does not take escapes, try

    perl -pe 'tr/\x91-\x92/\x27/' <INFILE >OUTFILE
    instead.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-02-27 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?