in reply to Problem with 'last' or problem with me?

It's not failing because of the last; it's failing because you've aleady read to eof in IGUSERS.

Use a hash for the ignored users:

open FH, "$workdir/ignoreusers" or die "Can't open $workdir/ignoreusers: $!"; my %ignore; while (<FH>) { chomp; $ignore{$_}++; } close FH or die "Can't close ignoreusers: $!";
Then you can look up an ignored user like this:
if ($ignore{$user}) { ## Ignore this user. }
In fact you could just stick this in your while loop:
next if $ignore{$user};
Then you can get rid of *all* of that $matched stuff.