#Declare them outside the loop or else we will just over-write them. my (@delete, @userid, @username); $delete = param("Delete"); $userid = param("userid"); $deletename = param("deletename"); my $othercount = 1; while (@personal[$othercount]) { if ($personal[$othercount] eq "$deletename") { $personal[$othercount] = ''; } else { } $othercount++; } my $str = ''; $str2 = join(' ', $personal[1], $personal[2], $personal[3], $personal[ +4], $personal[5], $personal[6], $personal[7], $personal[8], $personal +[9], $personal[10]); $str = "require user $str2"; open FILE, ">.htaccess"; print FILE $str; close FILE; print " <span id=\'p1\' style=\'\'> <div class=\"finish\"> <div class=\"finish2\"> <img src=\"aimages/$image.jpg\" width=\"84\" height=\"84\" /></div><di +v class=\"finish3\"> <h1 class=\"style1\">$errtitle</h1> <p class=\"style1\">$errmsg<br /></p></span>"; } exit;
Im getting closer, but now instead of deleting the selected user, it deletes the first user. (Always)

In reply to Re: Reading in and writing files by Trihedralguy
in thread Reading in and writing files by Trihedralguy

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.