You may be interested in use strict; and use warnings; for development, but be sure to at least turn off warnings for production.

As to your question of how the query string affects the page display, your code is difficult to follow -- at least trying to reconcile what it appears to do, with what you say it does/should. While I cannot speculate as to your intent, you may be interested in the following:

$mode = "default"; if($cur->param("mode")) { $mode = $cur->param("mode"); }

Can be condensed: $mode = $cur->param('mode') or 'default';

while (<TEMPLATE>){ $page .= $_; }

This is probably more efficent in "slurp" mode:

{ local $/; $page .= <TEMPLATE>; }

Actually, you may have answered your own question:

print_form() returns the form to be filled out, delete_appointments handles removal from the db and does not return anyting, updatE_day adds to database and returns error if any, and display returns the list of reservations.

The problem appears to lie in the subs themselves. I'd recommend making a new sub display_reservations with code from sub update_day, and invoked from both sub update_day and sub delete_appointments. Please post the code for the subs if you require further assistance.


In reply to Re: No update after delete by eibwen
in thread No update after delete by intranetman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.