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...

Replies are listed 'Best First'.
Re^3: PERL UNIX and strangeness and char conversion
by tybalt89 (Monsignor) 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.