local $_ = 'foo'; m/\Gfoo/gc && say 'Matched foo'; m/\G.+/gc && say 'Matched dot star'; m/\G\z/gc && say 'Matched end of string'; #### Matched foo Matched end of string #### local $_ = 'foo'; m/\Gfoo/gc && say 'Matched foo'; m/\G.*/gc && say 'Matched dot star'; m/\G\z/gc && say 'Matched end of string'; #### Matched foo Matched dot star #### local $_ = 'foo'; m/\Gfoo/gc && say 'Matched foo'; m/\G.*\z/gc && say 'Matched dot star and end of string'; #### Matched foo Matched dot star and end of string