By default, perltidy handles list with fat commas differently than plain lists. See "Controlling List Formatting" in the perltidy man page. This worked for me:
Output:perltidy -st -cab=1 -mft=1 -lp -vt=1 -boc PM_503139_02.pl
Key:my @list = ( '1', '2', '3', ); my %hash = ( a => '1', b => '2', c => '3', );
The real problem was in stopping @list from being flattened into one line, which perlytidy wants to do whenever the list *could* fit on a single line. The '-boc' flag, which tells it to using existing linebreaks, keeps @list in multi-line form, but this may be non-optimal for formatting the rest of your program.-boc --break-at-old-comma-breakpoints -mft=n --maximum-fields-per-table=n -cab=n --comma-arrow-breakpoints=n -lp --line-up-parentheses -pt=n --paren-tightness=n -vt=n --vertical-tightness=n -vtc=n --vertical-tightness-closing=n
In reply to Re: perltidy list formatting
by Util
in thread perltidy list formatting
by perrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |