Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm baffled, but maybe I need a second pair of glasses on top of the first one... What is the difference between:
and system "qrsh $qrsh_options lens -n \"source $qscript; test_model $arguments\" >$output_file 2>$logfile";my @qrsh_options = split / /, $qrsh_options; system 'qrsh', @qrsh_options, 'lens', '-n', "\"source $qscript; test_model $arguments\"", ">$output_file", "2>$logfile";
The first works, the second causes an error (a Tcl error - the part between the \"...\" is Tcl, which is the internal script language used by lens, but which I don't know well, so I still write my wrappers in Perl). As far as I can see, the error must be due to a difference between the two variants of the system call, but I don't see where. I want to use capture_exec from IO::CaptureOutput instead of system, but I need the 2nd kind of syntax for that, and I can't get it right :-/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax details with "system"
by cheekuperl (Monk) on Jul 19, 2012 at 16:28 UTC | |
by Anonymous Monk on Jul 19, 2012 at 20:07 UTC | |
by Anonymous Monk on Jul 20, 2012 at 01:45 UTC | |
|
Re: Syntax details with "system"
by thewebsi (Scribe) on Jul 20, 2012 at 05:49 UTC | |
by Anonymous Monk on Jul 20, 2012 at 17:57 UTC | |
|
Re: Syntax details with "system"
by Anonymous Monk on Jul 20, 2012 at 13:51 UTC |