in reply to Returning string and numerical data types from subroutines

Not completely unrelated: Rely on the system environment to put your program into daemon mode, don't attempt to re-invent the wheel for the millonth time. Daemontools can make a daemon from almost any program. Reliable logging is also handled by daemontools, just write to STDERR. See also The DJB Way.

From the viewpoint of a library user, I would prefer the principle of the least surprise:

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: Returning string and numerical data types from subroutines
by saurabh.hirani (Beadle) on May 16, 2009 at 05:27 UTC

    Thank you all for your feedback. I was avoiding the eval approach because I didn't want the program to die if the subroutine call fails. But then, as most of the posts suggested - its better to take matters in your own hands than to trust the library user with error checking and handling. Makes sense. I will keep that in mind.