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.)
In reply to Re: Refining my Program
by Anonymous Monk
in thread Refining my Program
by EmmittSmith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |