My first guess is abuse of $1.
Why not just call tr/// to count characters?
while (<DATA>) { print qq("$_" ), tr/ // <= 1 ? "has 1 or no spaces\n" : "has more than one space\n"; }
After Compline,
Zaxo
In reply to Re: Why am I get a core dump when I use ??{}
by Zaxo
in thread Why am I get a core dump when I use ??{}
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |