in reply to Neverending Life of a Student

I'd probably go with something like this
while(!$graduated) { $day++; if($test[$day]) { &write_test } &party; } sub write_test { if(int rand 100 > 90) { print "Test passed\n"; } else { print "Test failed\n"; } }
The party subroutine is way to complex to submit here..