in reply to If/Else or Unless Not Triggering Correctly

In addition to the already-mentioned fact that you should use eq instead of == operator for string comparison (or a hash lookup as suggested by talexb), this code line is also not good:
my $data = @_; # data passed into function to be processed
Assigning a scalar to an array is not likely to give you what you want. Try instead:
my $data = @_[0]; # data passed into function to be processed
or:
my ($data) = @_; # data passed into function to be processed
or:
my $data = shift; # data passed into function to be processed