in reply to cgi question
You should be using CGI for this, but see if this helps you (untested):
print "<table>\n"; my %names; { open my $name, 'gly_structures.txt' or die; while ( <$name> ) { my ( $ref_num, $glycan_name ) = split /\|/; die if defined $names{ $ref_num }; # die on duplicates $names{ $ref_num } = $glycan_name; } } open my $struct, 'N_structures.txt' or die; while ( <$struct> ) { my $number = ( /(\d+)/ )[ 0 ]; next unless defined $number; my $GU_web; open my $info_web, "${number}_info.txt" or die; while ( <$info_web> ) { if (/^(\d+\.\d+)\D/) { # probably wrong $GU_web = $1; last; } } close $info_web; die unless defined $GU_web; my $image = qq(<IMG SRC="images/$number.gif">); defined( my $structure_name = $names{ $number } ) or die; print "<tr><td>$GU_web</td><td>$image</td><td>$structure_name</td></ +tr>\n"; } print "</table>\n";
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: cgi question
by Anonymous Monk on Jun 03, 2005 at 14:24 UTC | |
by tlm (Prior) on Jun 03, 2005 at 15:27 UTC | |
by Anonymous Monk on Jun 03, 2005 at 14:28 UTC |