my $line = qr{ \A # Start of string \s* # Leading blanks \w+ # Key \s* \w+ # Value \s* # Trailing blanks \z # End of string }xms;