in reply to parsing 'length ...'

The clue is in this warning:
Warning: Use of "length" without parentheses is ambiguous
So...
$ perl -le '$_ ="a"; print length() ? "A" : "B"' A $