dbmopen

Consider using a tied hash instead.

print "Content-type: text/html", "\n\n";

You can add the \n\n in the first literal string.

die;

You shouldn't die unless a real error occurs. Bad user input is not considered a program error, so it should not output to STDERR (everything that is output to STDERR is appended to the error log of the webserver). Consider using exit instead.

if ($fields{'updsynpass'}==""){

Don't use == for string comparison. Use the string equality test operator eq instead.

$fields{'updalumemail'}::$fields{'updemailpub'}:: $fields{'updalumsnail1'}::$fields{'updsnail1pub'}::$fields{'updalums +nail2'}::$fields{'updsnail2pub'}:: $fields{'updalumsnail3'}::$fields{'updsnail3pub'}::$fields{'updphone +'}::$fields{'updphonepub'}::$fields{'updalumyears'}::$fields{'updyearspub'}:: $fields{'updcomment'}::$fields{'updcommentpub'}::$fields{'updsynpass +'}::$fields{'updsynpass2'}"

Ouch. Consider using join instead. That would also fix your original %09-character problem. join is the exact opposite of split.

$synusers{ $fields{updalumname} } = join '::', @fields{qw(updalumemail updemailpub updalumsnail1 updsnail1pub updalumsnail2 updsnail2pub updalumsnail3 updsnail3pub updphone updphonepub updalumyears updyearspub updcomment updcommentpub updsynpass updsynpass2)} +;

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk


In reply to Re: Re: Re: Updating entry in DBM file adds extra character %09 by Juerd
in thread Updating entry in DBM file adds extra character %09 by Anonymous Monk

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.