in reply to Testing for empty string

if ($rc=$ref->getc!~/./) { ... }
won't work because the !~ binds tighter than the "="...
So? That's what parens are for:
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 ( defined( $rc = $ref->getc )) { ... }