$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)
In reply to Re: How do I quickly strip blank space from the beginning/end of a string?
by ikegami
in thread How do I quickly strip blank space from the beginning/end of a string?
by blahblahblah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |