in reply to What difference do the brackets make?

The precedence of '>' is higher than that of the ternary operator, so the expression "$lines > 1" is evaluated before the "?:".

For a complete list of operator associativity and precedence, see perlop.