I would suggest using strict and warnings and setting values to empty string to avoid warnings. Try something like this:
#!/usr/local/bin/perl use warnings; use strict; use CGI; my $script_URL = "url of script goes here"; my $query = new CGI; print $query->header(); my $name = $query->param("f_name") || ''; my $tel = $query->param("f_tel") || ''; my $zip = $query->param("f_zip") || ''; if ( "$name$tel$zip" eq '' ) { &showform; } else { print "Name: $name\n"; print "Tel: $tel\n"; print "Zip: $zip\n"; } sub showform { print "<FORM ACTION=$script_URL METHOD=POST>\n"; print "Name: <INPUT TYPE=text NAME=f_name SIZE=24 value=\"$name\"> +\n"; print "Tel: <INPUT TYPE=text NAME=f_tel SIZE=12 value=\"$tel\">\n" +; print "Zip: <INPUT TYPE=text NAME=f_zip SIZE=5 value=\"$zip\">\n"; print "<INPUT TYPE=submit VALUE=\"SUBMIT\">\n"; }
update: added missing content-header

In reply to Re: help with a form by jZed
in thread help with a form by maynard49

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.