in reply to working with files

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.

Replies are listed 'Best First'.
Re^2: working with files
by texuser74 (Monk) on Sep 03, 2004 at 13:22 UTC
    Thanks for all your help.