in reply to
Regex for Differentiating Underscore and Whitespace
if you want to test if a string contains no underscore, use either
if ($str !~ m/_/)
or
if ($str =~ m/\A[^_]*\z/)
.
Comment on
Re: Regex for Differentiating Underscore and Whitespace
Select
or
Download
Code
In Section
Seekers of Perl Wisdom