... our $VERSION = '2021.0814'; ... ... $offs = () = /\PM/g; ... #### ... our $VERSION = '2023.0511'; ... ... $offs = /^\pM/ + ( () = /\PM/g ); ... #### $ uname -a CYGWIN_NT-10.0-19045 titan 3.4.7-1.x86_64 2023-06-16 14:04 UTC x86_64 Cygwin #### $ perl -v | head -2 | tail -1 This is perl 5, version 30, subversion 0 (v5.30.0) built for cygwin-thread-multi $ perl -MO=Deparse -e '$offs = () = /\PM/g;' $offs = () = /\PM/g; -e syntax OK $ perl -MO=Deparse -e '$offs = /^\pM/ + ( () = /\PM/g );' $offs = /^\pM/ + (() = /\PM/g); -e syntax OK $ perl -v | head -2 | tail -1 This is perl 5, version 38, subversion 0 (v5.38.0) built for cygwin-thread-multi $ perl -MO=Deparse -e '$offs = () = /\PM/g;' $offs = () = /\PM/g; -e syntax OK $ perl -MO=Deparse -e '$offs = /^\pM/ + ( () = /\PM/g );' $offs = /^\pM/ + (() = /\PM/g); -e syntax OK #### #!/usr/bin/env perl use strict; use warnings; use Unicode::UCD "charprop"; print "Perl version: $^V\n"; print "Example chars with Mark property:\n"; print "COMBINING GRAVE ACCENT U+0300: ", charprop("U+0300", "Gc"), "\n"; print "COMBINING ENCLOSING KEYCAP U+20E3: ", charprop("U+20E3", "Gc"), "\n"; my $x = "a\N{COMBINING GRAVE ACCENT}b\N{COMBINING ENCLOSING KEYCAP}c"; while ($x =~ /\pM/g) { print "Char at position @{[pos($x)-1]} HAS Mark property.\n"; } while ($x =~ /\PM/g) { print "Char at position @{[pos($x)-1]} NOT Mark property.\n"; } #### Perl version: v5.30.0 Example chars with Mark property: COMBINING GRAVE ACCENT U+0300: Nonspacing_Mark COMBINING ENCLOSING KEYCAP U+20E3: Enclosing_Mark Char at position 1 HAS Mark property. Char at position 3 HAS Mark property. Char at position 0 NOT Mark property. Char at position 2 NOT Mark property. Char at position 4 NOT Mark property. #### Perl version: v5.38.0 Example chars with Mark property: COMBINING GRAVE ACCENT U+0300: Nonspacing_Mark COMBINING ENCLOSING KEYCAP U+20E3: Enclosing_Mark Char at position 1 HAS Mark property. Char at position 3 HAS Mark property. Char at position 0 NOT Mark property. Char at position 2 NOT Mark property. Char at position 4 NOT Mark property.