in reply to Calling subroutine with exec() in .cgi script
Calling subroutine with exec() in .cgi script
exec, like the underlying system call, just substitutes the current process with another one: i.e. it executes another program and never returns. It is not for executing subroutines. (The most similar thing I can think of that is related to subroutines, is magical goto, but in "standard use" one rarely needs it and good old plain sub call is fine instead.)
|
---|