Or, given the file name is in @ARGV anyway:
$^I = '.bak'; /^#/ or print while <>;
to in place edit and generate a backup file.
In reply to Re^4: removing comments
by GrandFather
in thread removing comments
by dhudnall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |