Thanks Arnon. That answer was useful. I suspect the 1st form works because of the specifics here (qrsh is a Sun Grid Engine command which opens a shell on a node and runs "lens ... 2>$logfile"). I didn't realize it made a difference for the answer.
I finally found out what characters exactly needed to be escaped how many times
I just read about quotemeta and I suspect it wouldn't work for me because all the $ would be escaped and the perl variables wouldn't be resolved. But I will remember \Q...\E for the future - I'm sure it will come in handy sometime :-)system "qrsh $qrsh_options \"lens -n \\\"source $qscript ; test_model +$arguments\\\" >$output_file 2>$logfile\"";
In reply to Re^2: Syntax details with "system"
by Anonymous Monk
in thread Syntax details with "system"
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |