So? That's what parens are for:won't work because the !~ binds tighter than the "="...if ($rc=$ref->getc!~/./) { ... }
I like parens -- they're Good Things. But the first reply was right: since you're using getc, you should just test for the return value being defined:if (( $rc = $ref->getc ) !~ /./ ) { ... }
if ( defined( $rc = $ref->getc )) { ... }
In reply to Re: Testing for empty string
by graff
in thread Testing for empty string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |