The PBP suggests breaking assignments much like it suggests breaking other operators; the assignment leads the broken line:
my $thingy = $stuff + $hard_things + $foo;
The PBP suggests breaking assignments much like it suggests breaking other operators; the assignment leads the broken line:
my $thingy = $stuff + $hard_things + $foo;
This Practice is to break long expressions at lower-possible operators. It actually says “the lowest possible precedence”. At a glance, this sounds like a fine idea, and it, in general, is. The reason given is pretty solid, that you can easily confuse people about precedence by splitting things apart. This will be even more important on operators people may not be familiar with the precedence of. (Quiz: Which is higher precedence “&&” or “and”? Which is higher precedence, “~” or “^”?)