Sean Davis <mailto:[EMAIL PROTECTED]> wrote:
: suppose my form values are stored in variables : $a = param('name') : $b = param('age') : : Now I need to call a perl function wth $a, $b as parameters. : My $string = "perl test.pl $a $b" : system($string) : : This is wht I am using now. when I try eg: perl test.pl john 12 : It works. And the variables are bnided properly in cgi script. I : cheked to make sure. Can anyone suggest how i should proceed. First we need to cover some basics. You should refrain from using $a and $b as variable names. They are used in sort() and it can get confusing as you progress as a programmer. Use meaningful variable names, even for small test scripts. It's a good habit. Avoid naming a script test.pl. It is a common name for scripts and you may find yourself running some other program than you intended. Also investgate the use of the "strict" and "warnings" modules at the beginning of all your scripts. Do you have access to the test.pl script? Can you change it? If you can, I would advise not using an external system command to run another perl script. There are numerous internal perl methods available. Without looking at the script I can't tell much. Show us some example code including the source of test.pl. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>