I'm currently running Strawberry Perl on WinXP, and I'm trying to process a unix-formatted flat file. The flat file uses line feed characters to delimit fields, and form feed characters to delimit a record. I am trying to convert the FF to anything else (CRLF, ';', TAB, etc). I have tried using the following perl one-liners with no success:
perl -p -e 's/\f/\r\n/g' < unix.txt > dos.txt
perl -p -e 's/\x0c/\x0d\x0a/g' < unix.txt > dos.txt
perl -p -e 's/\f/\t/g' < unix.txt > dos.txt
The only thing I've noticed is that the the dos.txt ends up with all the LF chars converted to CRLF, but the FF chars remain. I've even tried to reprocess the dos.txt file, again trying to replace the FF, but still no dice. I am still very much a perl newbie, so maybe I'm missing something? Does anyone know why the above commands don't do what I want them to do?