Note, I've tried this with and without the delete function that here preceeds the update. Also, I am not certain that the character appended is always %09, but I know with the comment field it is definitely %09.

dbmopen(%synusers,"synusers",0666) || die "Can't open synusers DBM fil +e\n"; #search database entries while (($key, $value) = each(%synusers)){ if (index($key,$fields{'updalumname'})!=-1){ ($alumemail, $emailpub, $alumsnail1, $snail1pub, $alumsna +il2, $snail2pub, $alumsnail3, $snail3pub, $phone, $phonepub, $alumyears, $yearspub, $comment, $comme +ntpub, $synpass, $synpass2)=split(/::/,$value); if ($fields{'synpassold'} ne $synpass2){ print "Content-type: text/html", "\n\n"; print "Incorrect password. If you cannot remember you +r old password, email the webmaster."; die; } if ($fields{'updsynpass'}==""){ $fields{'updsynpass'}=$synpass2; $fields{'updsynpass2'}=$synpass2; } delete $synusers{$fields{'updalumname'}}; $synusers{$fields{'updalumname'}}=" $fields{'updalumemail'}::$fields{'updemailpub'}:: $fields{'updalumsnail1'}::$fields{'updsnail1pub'}::$fields +{'updalumsnail2'}::$fields{'updsnail2pub'}:: $fields{'updalumsnail3'}::$fields{'updsnail3pub'}::$fields +{'updphone'}::$fields{'updphonepub'}::$fields{'updalumyears'}::$field +s{'updyearspub'}:: $fields{'updcomment'}::$fields{'updcommentpub'}::$fields{' +updsynpass'}::$fields{'updsynpass2'}"; print "Content-type: text/html", "\n\n"; print "Thank you for updating your information."; die; } }
Edit by dws to add <code> tag

In reply to Re: Re: Updating entry in DBM file adds extra character %09 by Anonymous Monk
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.