in reply to redirecting output and warning messages

The other replies have hinted, but neglected to explicitly mention, that you can't use the filehandle in the system argument like that. LOGFILE, the string, gets interpreted by the shell as the name of the file to redirect output to.

Either use backticks to capture the output in Perl, or replace LOGFILE with $logfile, as in:

$status=system("$Cmds1 > $logfile 2>&1");
Note, however, that different shells do this differently. To be portable, do it in Perl yourself.

-QM
--
Quantum Mechanics: The dreams stuff is made of