Not exactly. There are several dozen parent programs that call a single child program (a global DBI handle). I've just discovered that many of the calling parent programs are using "require". So what I have is:
#!/usr/local/bin/perl # filename: parent.pl require child.pl ... ... And in child.pl, I need to determine the name of the parent program which called it. A simple $0 wont due and "caller" doesn't apply. Any other suggestions? Kirk [EMAIL PROTECTED] http://www.scriptdoggie.com ----- Original Message ----- From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 07, 2002 10:56 AM Subject: Re: [Perl-unix-users] Display parent program (.pl) from a package (.pm)? > From: "Kirk" <[EMAIL PROTECTED]> > > > Is there a system variable or some clever way to view all the > > "currently" running programs from within a package? This is a > > confusing question so here's an example. > > > > I have a program called "parent.pl": > > > > #!/usr/local/bin/perl > > use child > > ... > > ... > > > > > > Now, when Child is called, I'd like to see if parent.pl is calling > > child.pm or if it's some other parent program. > > So do you want the currently runing programs on the computer or > just the name of program that runs your code? > > If the later take a look at > perldoc perlvar > and search for > $0 > > Jenda > > =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== > There is a reason for living. There must be. I've seen it somewhere. > It's just that in the mess on my table ... and in my brain > I can't find it. > --- me > _______________________________________________ > Perl-Unix-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs