print $out_fh grep !/^$user,/, <$in_fh>;

As far as I can say, this does not work properly. Using the example under the Perl debugger I gave above in this post Re^5: problem with deleting a row, I obtain the following with your syntax:

DB<3> $user = "foo"; DB<10> print join " ", grep !/^$user,/, qw /foo foobar bar barfoo fo +bar foobaz /; foo foobar bar barfoo fobar foobaz DB<11> print join " ", grep /^$user,/, qw /foo foobar bar barfoo fob +ar foobaz /; DB<12>
This apparently does not work because $user is interpreted literally as a pattern. As I said in the post mentioned above, you need to force evaluation of $user into the content of the variable (I gave in that post two possible ways of doing that) to get this to work properly.


In reply to Re^4: problem with deleting a row by Laurent_R
in thread problem with deleting a row by brianMonk

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.