nice snippet but that does not force a reload or refresh (just a repetetion of the first request) instead it just forces the browser to NOT to CACHE the document content you delivered, so he will noct used previously cahced version to be displayed.
You could instead use HTTP (via CGI.pm), send from your script a "document created - see here"-Header follwed by your own scripts URL but that prohibits sending any content after such redirection header.
Have a nice day
All decision is left to your taste