Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Formatting nested data structure in Perl6::Form

by poj (Priest)
on Aug 14, 2014 at 14:37 UTC ( #1097430=note: print w/ replies, xml ) Need Help??


in reply to Formatting nested data structure in Perl6::Form

#!perl use strict; use Perl6::Form; my %table = ( name1 => ['b1','c1','d1'], name2 => ['b2','c2'], name3 => ['a3'], name4 => ['c4','d4','e4'], ); my @address; my @name; for my $adr (sort keys %table){ push @address,$adr; push @name, join "\r", @{$table{$adr}},' '; } my $report = form { layout=>"tabular"}, '+-----------------------------------------------------------+', '| {[[[[[[[[[[[[[[[[[[[[[[[[[[[} {[[[[[[[[[[[[[[[[[[[[[} |', \@address, \@name, '| |', '+-----------------------------------------------------------+'; print $report;
poj


Comment on Re: Formatting nested data structure in Perl6::Form
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1097430]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2015-07-29 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls