in reply to How to determine of script executed correctly?
You might find the replies of Toolic and Moritz to my question about Testing error handling that calls "die" will do what you want.
Conway's Game of Life
Perl regular expressions
My Magic 8-Ball™
Results (187 votes). Check out past polls.