note
Anonymous Monk
<p> Sure, but you can't invent your own syntax, you have to use perl's. <p> In perl, commas are not <strike>comma-colons</strike> I mean <strike>colon-commas</strike> semicolons . You can't just plop an if(){}statement into the middle of an expression ([id://101594|What is the difference between a Statement and an Expression?]). [doc://perlintro#if] is a [doc://perlsyn#DESCRIPTION|control structure] (a block) , it controls the flow of the program (branch/decision). <p> But, you can do what you were thinking of with a [doc://do]-block, or switch to the [doc://perlop#Conditional-Operator] (mini-if, ternary, trinary, terrychilds)
1051796
1051842
4