in reply to Re^3: Getting back control..to main script
in thread Getting back control..to main script

From the exec documentation:

The exec function executes a system command and never returns.
And when executing the following script
exec "dir /s d:\\temp\\"; print "done\n"; exit 0;
I get the warning
Statement unlikely to be reached at test6.pl line 2. (Maybe you meant system() when you said exec()?)
So exec isn't likely the correct answer to "getting back control". ;-)