From my experience does cperl not attempt to format nested data structures
It shouldn't, but it does. As you suspect, CPerl mode mistakes the nested data structure as a control structure, which it reformats intentionally (see example here). It just takes a wrong turn in the function cperl-fix-line-spacing. Therefore, it is rather obvious that the issue doesn't occur with arrays: square brackets can't be confused with control structures.
If you want M-x cperl-indent-region and M-x cperl-indent-exp to do indentation and nothing else, set cperl-indent-region-fix-constructs to nil.
In reply to Re^3: How would you indent this? (cperl-indent-region)
by haj
in thread How would you indent this?
by no longer just digit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |