#!/opt/gnu/bin/perl -wT use CGI ":standard"; use CGI::Carp "fatalsToBrowser"; use lib "../"; use Galaxies; #my defined module for SINGS $query = new CGI; print "\n\n"; &displayPage; #display the main page sub displayPage { @modelkeys =sort alphabetically keys(%sampleInfo); #get the seperation character they wanted my $mytype = $query->param('seperator'); my $sep; if ( $mytype eq "Colon") { $sep = ":"; } elsif ( $mytype eq "Space") { $sep = " "; } elsif ( $mytype eq "TAB") { $sep = "\t"; } else { $sep = ","; } for ($j=0;$j<=12;$j++){ print "$sampleInfo{'Model'}[$j] $sep"; } print "\n"; for $i (@modelkeys) { if ($i ne "Model"){ print "$i$sep"; for ($j=0;$j<=12;$j++){ if ( ($sampleInfo{$i}[$j] eq "\ ") or ($sampleInfo{$i}[$j] eq "... ") ){ print "$sep"; } else { print "$sampleInfo{$i}[$j] $sep"; } } print "\n"; } } print <