I have a file that I have read into a scalar and I want to delete every line that does NOT begin with two dashes (--).
Can someone tell me a trick to do that? Also, for my own learning, suppose I wanted to delete every line that does NOT begin with two dashes EXCEPT for empty lines (\n only).
Thank you for your help.
In reply to simple (in theory) regexp question by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |