Check the date on the output file. My guess is that that file was produced by a previous version of your script and then wasn't written to for a long time.
Whether that is the case or not, you might try to enhance your bug searching a bit:
Instead of putting in code that pauses at a specific point in time (what you tried with the $printer variable) and then checking the output file you should inspect your script at that time. Use the perl debugger and put a break point at a relevant line and with a condition. In your case you would do something like the following:
h gives you a short help screen, you can find out more with h <command>perl -d <yourscript> <parameters>
l lists a few lines of your script, do until you find the line you want to stop at (or enter l 50 to list around line number 50)h
lets assume line 32 is where you want to stop, but only if $searchstart is 1297l l l
the script now runs until it stops directly before executing line 32 when $searchstart has value 1297. If not, that line either was never executed or $searchstart never had the value 1297 at that line. Alternatively you could use "w $searchstart==1297" which would break the moment that condition is trueb 32 $searchstart==1297 c
now you can single step
and print any variabless s
p $startcord p @orthologous p $starthash{$i}
You see, the perl debugger is really not that difficult to use
The alternative to the debugger is to use temporary print statements in your code to check the variables, for simple tests it might be even faster, for serious bugfixing it is more work
In reply to Re: Perl overwriting some lines
by jethro
in thread Perl overwriting some lines
by perlbrahmin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |