if ($event eq 'JOIN') { # Read in protected user ids open (my $protected_fh, '<', $protected) or die "Unable to open $protected: $!\n"; my @protected = <$protected>; chomp @protected; close(PROTECTED) or die "Unable to close $protected: $!\n" # Verify that $user[0] is not protected. foreach my $protected_uid (@protected) { if( $protected_uid eq $user[0] ) { sock( join "\n", "PRIVMSG $tag", '', ":$user[0] Is A Protected User! $protected_uid", ); last; # stop processing after first match found. } } }