prasannakiran
Programmer
Hi,
I am new to perl and need help in the below situation
I have a C language executable called myprogram and i am calling it from my perl script test.pl.My OS is linux.
below is the code for test.pl
_______________________________________________________
_________________________________________________________
here the executable myprogram is an interactive program.
When i run, it asks to enter the user name first and then regristration number.So when i try to execute from the perl script, it is running fine and asking the user input.At present i am giving it manually..But i have to automate that process also..I am not getting how to provide input to that through perl script...Any help??
Thanks in Advance
PK
I am new to perl and need help in the below situation
I have a C language executable called myprogram and i am calling it from my perl script test.pl.My OS is linux.
below is the code for test.pl
_______________________________________________________
Code:
#!/usr/local/bin/perl
$command = "make";
system("$command");
chdir("/mydir");
$command = "./myprogram";
system("$command");
here the executable myprogram is an interactive program.
When i run, it asks to enter the user name first and then regristration number.So when i try to execute from the perl script, it is running fine and asking the user input.At present i am giving it manually..But i have to automate that process also..I am not getting how to provide input to that through perl script...Any help??
Thanks in Advance
PK