Syntactically, you need an expression here, not a statement, so you could use the ternary operator:
... for qq(p4 sync -k "$options{v}"), exists $options{f} ? qq(p4 -x "$options{f}" delete) : (), exists $options{a} ? qq(p4 -x "$options{a}" add) : (),
In reply to Re: using if statement along with qq
by Eliya
in thread using if statement along with qq
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |