in reply to Re: Shortcut for inserting comments
in thread Shortcut for inserting comments
perl -i.bak -pe '$_="# $_" if($.>=10 and $.<=20)' myscript.pl
You can omit mention of $. and the comparators if you want.
perl -i.bak -pe '$_="# $_" if 10 .. 20;' myscript.pl
Cheers,
JohnGG
|
|---|