Playing with promises in Perl and JavaScript