in reply to Refining my Program
Windows uses " instead of '.perl -pi.bak -e 's/(.*),(.*)/$2 $1/' test.txt
Beyond that, have an indentation style, check $! on open, and it usually winds up being a bad idea to edit files in place - leave the original and write a copy. (Or at least keep a backup as I did above.)
|
---|