On Thursday 11 October 2012 10:22:04 Gary Stainburn wrote:
> Hi folks.
>
> I've got a server script that I call via xinetd. I occasionally call it
> from the command line too, but now want it to handle the interactions
> differently depending on how it's called.
>
> Is there a quick and easy way to detect which method called it?

my $xinetd=(defined $ENV{REMOTE_HOST});
print STDERR "called remotely from $ENV{REMOTE_HOST}\n" if $xinetd;

-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to