So, this isn't self contained, and takes a fair amount of tweaking to make work, and even then I'm not sure I can make it duplicate your behavior. As is, you've left off:
- use CGI qw/:standard/;,
- the bit of CGI code that displays the button called 'New Entry',
- enough data stuffed into perhaps __DATA__ to recreate the problem.
Show us enough code that does all that (most importantly #4) that you can run in your environment, so that we can easily run it in our environments to be able to better help you.
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; =
qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)