in reply to guidelines for inline coding
My top tip for using statement modifiers is this:
print, sum += $_ for @array;
That is, if you find yourself wanting to trace the loop, don't go through the pain of reformatting the loop as block scoped in order to print the iteration, just add the print with a comma as a line preceding the modified loop.
Then comment the added line out or just blow it away when your done debugging.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: guidelines for inline coding
by misterperl (Friar) on Sep 26, 2014 at 13:59 UTC |