# Matching space my $str = "Check this out"; # regexes default to space is insignificant say "No match" unless $str ~~ m/ Check this out /; # Make space significant with the :sigspace modifier (or :s). say "Matched '$/'" if $str ~~ m:s/ Check this out /; # Match using a literal space. say "Matched '$/'" if $str ~~ m/ Check ' ' /; # Match using a named character class. say "Matched '$/'" if $str ~~ m/ Check <space> this <space> out /;