in reply to call another perl script

Several things:
  1. The reason that the script lm may not have run from a web browser is because Apache (or whatever webserver you are using) may not be configured to run files which don't end in .cgi
  2. You call to System should system. in other words, all lowercase. Secondly, if your test.cgi script has a use CGI; perl statement in it and you are calling it via a system call, you have to set $ENV{QUERY_STRING} before the call so that test.cgi has a query string for test.cgi to parse. Otherwise (and I may be wrong here) it will simply look for input on STDIN and you will have to pipe in POST data from the first program to the second.
  3. My guess is that you want to serve the HTML output of the second script back as the result of calling the first one via a web browser? You can certainly do all of that in one file and it would save an extra fork() call. Why don't you list the two programs so that we can suggest an integrated solution.