Perl translation of node.http