Am I correct in thinking that in older version of Perl "sleep" didn't actually work in a Browser as it does in SSH?
No. The perl internal function 'sleep' never worked in a browser running without an embedded perl -i.e any browser. But! Years ago I've seen a perlTk browser, which AFAIK didn't execute perl code retrieved from the web embedded in a HTML document, either.