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
In reply to Re: cgi question
by tlm
in thread cgi question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |