in reply to Re: Reconcile one list against another
in thread Reconcile one list against another

This will do what the OP said he wanted to do, but should user ed match a line for user ted or fred. The OP will probably be better off isolating (just) the user names from both files, then doing exact matching.
  • Comment on Re^2: Reconcile one list against another

Replies are listed 'Best First'.
Re^3: Reconcile one list against another
by wind (Priest) on May 04, 2011 at 18:59 UTC

    That is true, my code was just meant to solve is state variable quandary.

    Without thinking too deeply about it, your noted problem might be solved by simply adding some word boundaries:

    if (my @matched = grep {$line =~ /\b\Q$_\E\b/i} @users) {