> Well, yes, but the way you've designed this, you already run that risk. > > Now if you replaced get_scriptname() with get_subroutine(), and found a > way to abstract out the bits that are different for each $recipient, > then you could simplify things tremendously, and hopefully make your > resource needs go way down: > > { > $recipient = "[EMAIL PROTECTED]"; # This will come from the MTA > $sub_name = get_subroutine($recipient); # do this in one step > > $sub_name->($arg1,$arg2,$arg3); > } > > This will do everything without making any external calls. >
So you are suggesting I write all the user scripts as diff subroutines in a single module. That is almost impossible in my case, When I design the SMTP server I have no idea how many users will be there According to the current design , the user uses a UI which inturn creates a file ( a perl script ). The Mailscanner Daemon uses these scripts when a mail is recvd for a user and takes actions. Suppose even If I change the UI to write into a single module , the Module may become a huge file , I dont want such a mess. I have thought of a different Idea. The user-wise perl script will set the output in a variable with a global namespace. My main process will do() the script and simply read the variable. like { $scriptname = get_scriptname($recipient) do("$scriptname $arg1 $arg2 $arg3"); $output = $global::output; # This variable is set by the $scriptname do_something($output); } I will try it right away Should work right? Thanks Ram ---------------------------------------------------------- Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps: http://cleanmail.netcore.co.in/directory.html ---------------------------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>