in reply to using if statement along with qq
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) : (),
|
|---|