I recently switched from using Active State perl on a Windows box to a Linux machine. At first my perl scripts (I'm a heavy user of regexp) seemed to work fine. But as I started processing more text files ("writer" html files from Libre Office) and started adding more regexp code to my script, I started noticing weird goings-on.
I get bizarre characters Like a strange â instead of a dash. So I thought that it may have to do with encoding, but wan't too worried if it's just an occasional weird character popping up. But then my regexp code itself seemed hay-wire -- matching things it shouldn't.
I am very good at regexp language (the main stay of my toolset :) But I am so confused about encoding. I've tried different parameters at the end of my regexp statements, like /u or /a or /d
And I've tried
And for my filehandles:
Can you please help? I believe my ignorance when it comes to encoding is getting in the way. I simply want my regexp to work the way it used to on a Windows box. If it means I can only use ascii, that's fine with me. I just need to know how :)