<?xml version="1.0" encoding="windows-1252"?>
<node id="586590" title="Re: Text Columns" created="2006-11-28 18:02:33" updated="2006-11-28 13:02:33">
<type id="11">
note</type>
<author id="107600">
TheDamian</author>
<data>
<field name="doctext">
Perl 6 formats aren't like Perl 5 formats. They're much more dynamic. And available in Perl 5. Try this:

&lt;blockquote&gt;
&lt;code&gt;
use List::Util qw&lt; max &gt;;

my $terminal_cols = 80; # or whatever
my $column_gap    = 3;  # or whatever

my @display_items = map { "$_: $hash{$_}" } sort keys %hash; 

my $max_col_width = max map {length($_) + $column_gap} @display_items;
my $column_count  = $terminal_cols / $max_col_width; 
my $formatting    = '{:[[{*}[[:}' x $column_count; 

use Perl6::Form; 
print form $formatting, (\@display_items) x $column_count;
&lt;/code&gt;
&lt;/blockquote&gt; </field>
<field name="root_node">
586569</field>
<field name="parent_node">
586569</field>
</data>
</node>
