There are lots of good solutions here, but no answers as to why your code isn't working.
I suspect it is because of the minimal approach (dot star question) instead of the maximal (dot star) and the attempt to include the newline.
I think the answer that includes chomp and the match-at-beginning-of-string caret should work with littlest change to your code, so you can check out the differences. There are slimmer solutions, though.
In reply to Re: working with files
by THuG
in thread working with files
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |