This is quite nice, if a bit opaque; I fiddled with it to get a 2-char spacer - as well as the sprintf, I modified the initialisation of @total so:
which seemed to do the right thing, but there may be edge cases I missed.my @total= ( $#$avItems, map $_ * 2, 0 .. ($maxCols-1) );
Hugo
In reply to Re^2: 'ls -C' column style (sideways)
by hv
in thread 'ls -C' column style
by hv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |