open(PIPE, "$CommandToExecute|"); while () { # <--- This is the line that the error points to print LOG $_; print $_; }