getopt('st',\%opt); if ($opt{'t'}) { $test = 1; ## testing } elsif ($opt{'s'}) { $test = 0; ## not testing } #### if ( (!(defined($opt{'s'}))) && (!(defined($opt{'t'}))) ) { ## neither option was used let's check sitetest file for a test value printf "Reading from sitetest file\n"; open(TEST,"< test") or die "Can't open file test \n"; my $line = ; close STEST; print $line."\n"; if ($line =~ /0/) {$test = 0;} }