if (true) {open (my $fh, ">> RESULT_LOG"); copy "Battery_Status", $fh;} else {print "Error";}