This doesn't have much to do with perl, but you could have the basic page say that JavaScript is required to use it. Then, have a JavaScript function that is set to run on page load, and have it disable the non-JavaScript text and then show the proper content.