You want -p for the impicit loop and print, instead of -n wich just loops.
Also, since I've picked up Golf recently...
perl -i -lpe'/^%/?--$.:s/^(?:N\d+\s?)?/N$. /'— Arien
In reply to Re(2): File Handle Basics
by Arien
in thread File Handle Basics
by airblaine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |