execute.pl
and it calls child.pl
through system
call.AppLogger
in execute.plAppLogger
is package and an interface to my Scribe
Logging serverNow in this AppLogger
I am establishing a connection to my Scribe
Logging server and has various funtions like sendlog
which sends logs to server.
execute.pl:
use AppLogger;
use strict;
use warnings;
my $logger = new AppLogger;
system("perl child.pl")
As I know system
is a OS
call and child.pl
will be completly different process but still Is there a way I can access $logger
ie AppLogger
object inside child.pl without re-creating an connection object each time I want to log.
No. system
is a wrapper around fork
+exec
+wait
. exec
replaces the program executing in the process, including its heap (memory).