$|=1; open F, ">>state.txt"; my $position = Spider::unmash($best); movestack($position, $best, ">lastpos".$$.".txt", 1); print F scalar localtime(time), "Moved stack\n"; close F; open F, ">>state2.txt"; %positions = (); print F scalar localtime(time), "Reset positions\n"; close F;