in reply to Unable to reach branch - Dead code or defensive programming?

Maybe try $length = 0
poj