unless ($^O =~ /aix/) { die ... } # might be better as die ... unless $^O =~ /aix/;