-printf "%-20s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
-printf "%-20s %-15s %-10s\n","--","--","--";
-foreach $key (keys %totals)
+$maxlen=$maxlen+2;
+printf "%-${maxlen}s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
+printf "%-${maxlen}s %-15s %-10s\n","--","--","--";
+foreach $key (sort keys %totals)