Can you please tell me the difference between \\z and \\Z as well as \\a and \\A in Perl with a simple example ?
The following indicates the positions at which the relevant regex patterns will match (␊ indicates a line feed):
\A \A is not affected by /m
^ ^ without /m ≡ \A
^/m ^/m ^/m ^ with /m ≡ \A|(?<=\n)
| | |
| | |
v v v
abc␊def␊ghi␊
^ ^ ^^
| | ||___
| | | |
$/m $/m $/m $/m $ with /m ≡ (?=\n)|\z
$ $ $ without /m ≡ (?=\n\z)|\z
\Z \Z \Z is not affected by /m ≡ (?=\n\z)|\z
\z \z is not affected by /m
\a is equivalent to \x07, meaning it matches character 0x07 (BEL/BELL in ASCII and UNICODE).
This is documented in perlre.