perl process bring a file with duplicates results : I 'm not sure that this process is the cause, the result is in the file QUERIES_LIST which have duplicates results following each other, can this part of script be in cause, so that it execute the script of copying multiples times or other cause, thanks for your help:

	my $ok = 0;

	llog ($DEBUG, 'begin step=['.(defined $step ? $step : 'N/A').']');

	if (defined $step and $step eq 'CTL')
	{
		hlog ($INFO, 'begin CTL step');

		my $MAX_PROCESS_TO_USE;
		my $queries_to_execute = [];
		my @team = ();

		$SIG{CHLD} = \&zombies_killer;

		$DICTIONARY->{LIST_REQUETE} = $CONFIG->{ExportFiles}->{QUERIES_LIST};
		$DICTIONARY->{separator_req} = $CONFIG->{CTLQueriesSeparators}->{separator_req};
		$DICTIONARY->{separator_ctl} = $CONFIG->{CTLQueriesSeparators}->{separator_ctl};
		$DICTIONARY->{ALL_QUERY_CTRL} = $CONFIG->{ExportFiles}->{QUERY_CTRL_GET};
 
		my $sr;
		my $msgs;

		if (can_we_proceed_now ($CONFIG))
		{
			($ok, $sr, $msgs) = ExecScripts
				(Scripts =>
				[ 
					$CONFIG->{BTEQScripts}->{query_control}
				],
				Messages =>
				[
					'FILE=Get control queries listEXEC=',
				],
				Files =>
				[
					$CONFIG->{ExportFiles}->{QUERIES_LIST}
				],
				NoExec => [ 1 ],
				);

			llog ($DEBUG, "CTL1 ok=[$ok] SR=[".Dumper ($sr).'] msg=['.Dumper ($msgs).']');

			if (!$ok)
			{
				llog ($INFO, 'an error occured previously, abort');
				return CTL_FAIL_GET_CTRL_QUERIES;
			}

			if (!-z $CONFIG->{ExportFiles}->{QUERIES_LIST})
			{			
				$ok = ctl_clean_exported_file
				(
					INPUT_FILE => $CONFIG->{ExportFiles}->{QUERIES_LIST},
					OUTPUT_FILE => $CONFIG->{ExportFiles}->{QUERIES_LIST}.'.tmp',
				);
