{ no strict 'refs'; while (<$file>) { $length += length($_); } }