One way I've handled this is to use a session management framework and put something in the session on the first submit to indicate that it has been processed. I check for the presence of this flag before doing anything with the form data and show an appropriate message if I see that it's already been done.
I use Apache::Session but there are other options.