hmmm, exit should exit the script cleanly ? dont forget about scope though ... hes calling exit from within a subroutine, and i think the rules state that exit exits the subroutine, not the script, just like doing an exit from a UDF. I think the real solutiion to this, and better programming practice, is that one should never want to really exit from within a UDF or sub-routine anyways ... should always exit from the mainline ...