Just negate the test. 'ok' is looking for the test to succeed. If you are testing a sub and are looking for it to fail then re-write the test such that the failure of the sub is a succesful test.
# this one should succeed when the sub fails
ok(!my_sub('bad parameter count'), "Bad param test");