. . if (-e -s $errorLog) { my @errorContents = read_file($errorLog); print "@errorContents"; sendMail("abc@xyz.com", "Error in build", @errorContents, "abc@xyz.com"); }