perl: removed lvalue subs to support old perl versions