Using "system" command - is it "bad practice" for perl?
From: John Davis (tudmuf2b_at_onebox.com)
Date: 09/28/04
- Next message: Gunnar Hjalmarsson: "Re: Using "system" command - is it "bad practice" for perl?"
- Previous message: Abigail: "Re: Precedence of exponentiation"
- Next in thread: Gunnar Hjalmarsson: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Gunnar Hjalmarsson: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Jürgen Exner: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Abigail: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Shawn Corey: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Tintin: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Joe Smith: "Re: Using "system" command - is it "bad practice" for perl?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Sep 2004 16:49:48 -0700
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!
- Next message: Gunnar Hjalmarsson: "Re: Using "system" command - is it "bad practice" for perl?"
- Previous message: Abigail: "Re: Precedence of exponentiation"
- Next in thread: Gunnar Hjalmarsson: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Gunnar Hjalmarsson: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Jürgen Exner: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Abigail: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Shawn Corey: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Tintin: "Re: Using "system" command - is it "bad practice" for perl?"
- Reply: Joe Smith: "Re: Using "system" command - is it "bad practice" for perl?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|