in reply to getting the right stuff
my $value = param('name');#the value passed from the webpage my %data = (); my @fields = split(/\t/, <FILE>); my $row; my $id; my $course; chomp @fields; my @records; my @course; while(<FILE>) { chomp; my @row = split(/\t/); if ($row[0] eq $value) { ($id, $course) = split (/\t/); my %data; #then put the row into a hash. @data{@fields} = @row; push @records, \%data; } } close (FILE); for my $ref (@records){ my %data = %$ref; print ul( map { ul("$course") } keys %data);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: getting the right stuff
by eg (Friar) on Feb 07, 2001 at 05:14 UTC | |
by malaga (Pilgrim) on Feb 07, 2001 at 05:29 UTC |