in reply to problem and error writing a command

qw() doesn't interpolate, therefore $options{des} will be treated as a literal string.

Use the following if you really want each element as a list instead of a single string like if you used qq{}.

$cmd = [ qw(p4 submit -d), $options{des}, qw(-f submitunchanged -i) +];

Replies are listed 'Best First'.
Re^2: problem and error writing a command
by Anonymous Monk on Mar 11, 2011 at 08:17 UTC
    I figured out for the step 1,but for step2 I am having trouble figuring out...getting the below syntax error...Please advise
    $cmd = [ qw(p4 tag -l ), TEST_$options{r}_$date, $options{v} ]; run3($cmd, \$stdin, \$stdout, \$stderr); print "\n$stderr\n";
    syntax error at perl.pl line 197, near "$options{r" Execution of perl.pl aborted due to compilation errors.
      $cmd = [ qw(p4 tag -l), "TEST_$options{r}_$dat", $options{v} ];

        One last question if you dont mind,how about the below command?

        $cmd = [ qw(p4 label -o -t ), "TEST TEST_$options{r}_$date", qw(| p4 +label -i) ];