#_ Check for minimum number of command line argument variables if($#ARGV < 6) { Usage(); print "NOT ENOUGH COMMAND LINE ARGUMENTS\n"; exit 0; } #_ Command line options & setup filenames my($alignment_file, $scorecons_file, $image_file, $numbered_model, $csa_file); foreach my $i (0 .. $#ARGV) #for ($i=0; $i<=$#ARGV; $i++) { if($ARGV[$i] eq "-a") { $alignment_file = $ARGV[$i+1]; } if($ARGV[$i] eq "-s") { $scorecons_file = $ARGV[$i+1]; } if($ARGV[$i] eq "-i") { $image_file = $ARGV[$i+1]; } if($ARGV[$i] eq "-m") { $numbered_model = $ARGV[$i+1]; } if($ARGV[$i] eq "-c") { $csa_file = $ARGV[$i+1]; } } if (not defined $csa_file) { Usage(); print "No CSA file defined\n"; exit 0; } print "test $csa_file\n"; my $fh_csa = new FileHandle($csa_file, "r") or die "Cannot open CSA file: $csa_file ($!)";