And just to expand briefly on the point dws made concerning the Missing right curly or square bracket... error - I have found PerlTidy to be rather handy in tracking down those types of errors. It can save you a lot of time and eye strain searching for the missing curly bracket :-)