now i have to make it print nicely in tables. back to work.sub getrows { my @records; my $value = param('name'); my $rowid = $ARGV[0] || $value; my %data = (); my @fields = split(/\t/, <FILE>); chomp @fields; while(<FILE>) { chomp; my @row = split(/\t/); if ($row[0] eq $rowid) { my %data; @data{@fields} = @row; push @records, \%data; } } close (FILE); print header; for my $ref (@records){ my %data = %$ref; print ul( map { li("$data{$_}") } keys %data); } }
In reply to Re: Re: Re: Re: Re: Re: Re (tilly) 3: hash/array
by malaga
in thread hash/array
by malaga
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |