harry1982 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
i have problem in calling a shell script with in my perl program, here is what i need
perl script should call shell script for which i use system,but shell script which gets called needs ctrl-c at the end to terminate
if i press ctrl-c , my main perl script is getting terminated.
pls suggest on above, i tried fork but not really familer with that if i can use.
pls see sample code below.
#!/usr/bin/perl use strict; use warnings; # i have skipped many steps here for ease system("a2interf -i $t_dir -B -L lance_sg11"); # above call needs ctrl-c to be terminated # i.e. script a2interf needs ctrl-c to terminate
system call should terminate with ctrl-c , how can i proceed with my perl program after system call
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Run Shell script followed by ctrl-c within perl
by BrowserUk (Patriarch) on Nov 25, 2009 at 04:52 UTC | |
|
Re: Run Shell script followed by ctrl-c within perl
by keszler (Priest) on Nov 25, 2009 at 04:16 UTC | |
|
Re: Run Shell script followed by ctrl-c within perl
by colwellj (Monk) on Nov 25, 2009 at 04:15 UTC | |
by harry1982 (Initiate) on Nov 25, 2009 at 06:19 UTC | |
by colwellj (Monk) on Nov 25, 2009 at 23:09 UTC | |
|
Re: Run Shell script followed by ctrl-c within perl
by ww (Archbishop) on Nov 25, 2009 at 04:36 UTC |