in reply to How do I quickly strip blank space from the beginning/end of a string?
$x =~ /.*[A-Z]/g and $x =~ s/\G.*// can be written as $x =~ s/(.*[A-Z]).*/$1/ and as $x =~ s/.*[A-Z]\K.*// (requires 5.10.0)