#!/usr/bin/perl use strict; use warnings; use File::Copy; my $value0 = 1; #change this to 0 and execute and back to one and execute my $value1 ='true'; open (INFO, "> tmp"); print INFO "this is simple\n"; close (INFO); open (FILE, ">> RESULT_LOG") ; print FILE " STATUS obtained : $value1\n"; if ($value0 == 1) { # If true then copies the information to the RESULT_LOG copy("tmp","RESULT_LOG");} else { print FILE "Check keyword supplied\n";} close(FILE);