However this doesn't work. Instead, it erases the whole file. It makes sense that it should wok though, but for some reason it doesn't. Any idea why? thankswhile (<>){ if (/^#!/){ $_ .= "Add this line.\n"; } }
In reply to To add a string to the content of a file by Babambar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |