### Update the main threads file tie @threads, 'Tie::File', $main_threads_file or syslog('err', "update_threads couldn't open file: $main_threads_file"); if ($thread == $msg_id) { # put it right at the top, it's a new thread unshift @threads, $link; } else { for (@threads) { if (/$parent/) { if (##next element is "