In this case, where the string the pattern is being run
against was obtained from a while (<FILE>)
(and should, therefore, be a single line),
how do they differ and why do you prefer
\A/\z?
Comment on Re: Re: Re: One or more of a pattern...
The post was in response to a question about matching against a string. I assumed the poster would just take the regex and stick it into his code unaltered. In that case ^ and $ are clearly wrong since the could allow a bad string like "foo(10):bar(20)\n!!!!!!!!!!" to match. By contrast \A can only mean the start of the string and \z can only mean the end of the string. They are unambiguous and do not depend on options to determine their match.