From: Hugh Sasse Staff Elec Eng <hgs / dmu.ac.uk> > Would it be possible to have a test for "when calling this code, it > is possible to exit leaving a global variable changed"?. There are > only so many wasy to leave a method, module... without completely > crashing. As I mentioned. In perl it is possible to use dynamic scoping to limit the code that sees a change to one of these variables, but introducing dynamic scoping to Ruby would be a Bad Idea(tm). Also in Ruby all the thing those vars change are all optional arguments to the methods that use them and they just set the default. This means the vars and not really needed: paragraphs = File.open("paper").read.split(/\n\s*\n/) That is not true for $=, but then I don't think I like $=... Does this work? #!/usr/bin/ruby -w $/.freeze # prevent changing from defaults # repeat for other vars... # my code here -Wayne