John Davis
2004-09-27 23:49:48 UTC
A couple of quick questions, it is considered "bad" perl programming
(from a style perspective) to ever use the system() command to call
UNIX level commands in a script, or should the "backtick"/exec method
be used at all times (if possible).
I was working on a piece of code today and realized that after the
running the system commands as follows:
system "co -l /src/test-script2.pl"; # to checkout for RCS
system "vi /src/test-script2.pl"; # edit and process it and return
back
*** IT NEVER COMES BACK from the vi command!
system "ci -u /src/test-script2.pl";
foreach @x {
blah blah blah...
}
It did not return "control" back to my script and I had to Control-C
out of this script, and got frustrated at the system command. Is this
supposed to happen? Because in a ksh script, after doing a "vi", I
should get back to where I need to be.
Thanks!
(from a style perspective) to ever use the system() command to call
UNIX level commands in a script, or should the "backtick"/exec method
be used at all times (if possible).
I was working on a piece of code today and realized that after the
running the system commands as follows:
system "co -l /src/test-script2.pl"; # to checkout for RCS
system "vi /src/test-script2.pl"; # edit and process it and return
back
*** IT NEVER COMES BACK from the vi command!
system "ci -u /src/test-script2.pl";
foreach @x {
blah blah blah...
}
It did not return "control" back to my script and I had to Control-C
out of this script, and got frustrated at the system command. Is this
supposed to happen? Because in a ksh script, after doing a "vi", I
should get back to where I need to be.
Thanks!