In the script below I am having trouble printing the form results in a clean alignment. You can view the script at http://sulfericacid.perlmonk.org/tags.pl, fill in all the fields and click submit to see the results.

The first line prints the text <br> rather than printing the line break and on the first line it prints two form elements on the same line (when it should all be broken down on their own line like the rest of the script).

Can someone show me how to break the first line into two lines and remove the <br>?

#!/usr/bin/perl -w use CGI::Carp 'fatalsToBrowser'; use strict; use warnings; my $adv = "Advertise your script here!"; my $adminmail = "sulfericacid\@qwest.net"; use CGI qw/:standard/; print header, start_html(), start_form, "Email Address: ",textfield('usermail'),p, "Author: ",textfield('author'),p, "Distributor: ",textfield('distributor'),p, "Copyright: ",textfield('copyright'),p, "Abstract: ",textfield('abstract'),p, "Keywords: ",textfield('keywords'),p, "Description: ",textfield('description'),p, "Distribution: ",textfield('distribution'),p, "Robots: ",textfield('robots'),p, "Rating: ",textfield('rating'),p, "Language: ",textfield('language'),p, submit, end_form, hr; my $abstract = param('abstract'); my $usermail = param('usermail'); my $author = param('author'); my $distributor = param('distributor'); my $keywords = param('keywords'); my $description = param('description'); my $distribution = param('distribution'); my $robots = param('robots'); my $rating = param('rating'); my $language = param('language'); my $copyright = param('copyright'); my $tags =''; if (param('abstract') ne "") { $tags .= qq(&lt;meta name="abstract" content="$abstract"&gt;<br>) +; } if (param('author') ne "") { $tags .= qq(&lt;meta name="author" content="$author"&gt;<br>); } if (param('distributor') ne "") { $tags .= qq(&lt;meta name="distributor" content="$distributor"&gt +;<br>); } if (param('copyright') ne "") { $tags .= qq(&lt;meta name="copyright" content="$copyright"&gt;<br +>); } if (param('keywords') ne "") { $tags .= qq(&lt;meta name="keywords" content="$keywords"&gt;<br>) +; } if (param('description') ne "") { $tags .= qq(&lt;meta name="description" content="$description"&gt +;<br>); } $tags .= qq(&lt;meta name="generator" content="$adv"&gt;<br>); if (param('robots') ne "") { $tags .= qq(&lt;meta name="robots" content="$robots"&gt;<br>); } if (param('language') ne "") { $tags .= qq(&lt;meta name="language" content="$language"&gt;<br>) +; } if (param('distribution') ne "") { $tags .= qq(&lt;meta name="distribution" content="$distribution"& +gt;<br>); } if (param('rating') ne "") { $tags .= qq(&lt;meta name="rating" content="$rating"&gt;<br>); } $tags =~ s/</&lt;/; $tags =~ s/>/&gt;/; $tags =~ s/<br>//; print $tags; print hr; print end_html();


"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid

In reply to CGI aligning by sulfericacid

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.