>I am not exactly sure if this was meant to be a feature or whether it is
>a bug, but when parsing files as input streams (with the help of the

The awk package actually started out as a Perl4 compatible regex
package in 1996 (it feels like only yesterday, but I guess it's just
about 5 years now, ouch!).  After it was supplanted by the Perl5
package, it seemed to make a lot of sense to change it around a
little bit and make it awk compatible (sometime in 1997).  It would
seem you've spotted a long lingering discrepancy.  Unlike Perl, the
default behavior of '.' in awk is to match everything, including newlines.
Rather than break people's code by inflexibly changing the code to only
observe that behavior, I'll make that the default behavior and add a
compilation flag to allow it not to match newlines so that people relying
on the broken behavior just need to add the compilation flag to their
code.

daniel


Reply via email to