all of the non null exit statements within the script are preceeded by a write to an error log, and none mention the value 255 (or even -1)
I don't see anything written to the error log so I assume that PERL itself is setting that exit code...
-Stuart.