Thread Gibt es ein Modul, um einfach mit verschachtelten Listen zu arbeiten?
(3 answers)
Opened by xubaso at 2009-06-27 23:31 2009-06-28T10:29:14 xubaso Einfach ein LookupTable aufbauen: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 #!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Carp; my @tables = ( { "table" => "table1", "description" => "bla", "datafield" => [ { name => "field1", assoc_table => "table2", } ] }, { "table" => "table2", "description" => "blubb", "datafield" => [ { name => "field1", assoc_table => "table3", } ] }, ); my %lut = map { $_->{'table'} => $_->{'datafield'} } @tables; print Dumper \%lut; -- yet another amateur perl hacker
|