Here is code below I have which works for 1 match in array if I define it but can't get it work with multiple values in an array. Foreach my $username (@remove_users) complains about match when I try wrapping it around foreach my $line (@file_lines). Thanks for your help.

Code:

@remove_users;

if (not defined $test_file) {
#Make sure that the $test_file was passed in too.
die qq(Name of log file not passed to subroutine "removeUsers"\n);
}