http://www.perlmonks.org?node_id=860229


in reply to Re^2: length() returns wrong result - suspicious magic
in thread length() returns wrong result - suspicious magic

No, at the start of the loop. After the fetch, but before you use it.