use warnings; use strict; while (<DATA>) { if (/\w\s+\w/) { print "yes\n"; } else { print "no\n"; } } __DATA__ John Doe Joe John D John John
Outputs:
yes yes no no
In reply to Re: Check for Spaces in a String
by toolic
in thread Check for Spaces in a String
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |