Hi Everyone,
I have an TPL that generates an HTML output. In that TPL as an include i have an ipl , in this ipl file am doing an read operation on an XML file ,if the file is not found i write the log for it.. My ipl code looks like this
my $debug = 1; # Set debug to 0 to stop logging
my $file ="some.xml";
open(FP,$file) or error("\nERROR: cannot find the file $file");
close(FP);
sub error
{
my ($message) =
@_;
return unless $debug;
open(FILE,">>logfile.txt");
print FILE "$message\n";
close(FILE);
}
can any one please giude me...!
Thanks.