in reply to Writing multiple-stage tests

You can have as much prep code as you want between calls to ok (and the like). There's nothing special about ok. It's just a function that checks if the value you passed to it is true or not, and prints out something appropriate in response.
my ($x, $y) = (1, 2); is($x, 2, 'x'); is($y, 3, 'y'); $x += 4; is($x, 6, '+=');

(I used is instead of ok since there's rarely any reason to use ok.)