in reply to Re: editing files with (<>)
in thread editing files with (<>)

Can it? I think that  /^.*$/ will match a string that does not contain a newline, because of the '^' and '$' anchors. If I'm right, and given the cold medicine I'm taking that is certainly no given, any line with a '\n' will not match the regular expression. As $_ is being read from a file, they all will contain a newline. I think. Ugh, more sudafed, please.

That said, people are right in pointing out that that part of the if clause can be eliminated since it is changing data then doing nothing with it. If nothing else, it should speed up the code.

--
tbone1, YAPS (Yet Another Perl Schlub)
And remember, if he succeeds, so what.
- Chick McGee