in reply to If/Else or Unless Not Triggering Correctly

As a matter of style, I prefer to use a hash to figure out whether something is in a set, or not. So your code would be simplified to the following:

sub triggerNotification { my ( $data ) = @_; my %message_classes = ( 'ARCHITECH' => 1, 'CURR-LIB' => 1, 'MARKET_PL' => 1, ); if ( not exists $message_classes{ $data } ) { # Send an E-Mail notification if the message type is not listed. } }
Using 'data' has a variable name is amusing -- you can probably find a better name than that. :)

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.