in reply to Re: Re: How was my script ran?
in thread How was my script ran?

Okay, follow-up question: Is there someplace I could find out what ENV keys I should be expecting in general with these things? I mean, I would assume $ENV{"SENDER"} is probably pretty universal among MTAs/MDAs calling a perl script, but others seem pretty OS/MTA/MDA/webserver specific and I would like to avoid using those ;-)

Replies are listed 'Best First'.
Re: Re: Re: Re: How was my script ran?
by Anonymous Monk on Mar 05, 2003 at 02:31 UTC

    Wouldn't it be a bit simpler to pass a caller-id parameter into the script?

    perl -s yourscript -C=cgi ..other params...

    perl -s yourscript -C=mta ..other params...

    perl -s yourscript -C=cli ..other params...

Re: Re: Re: Re: How was my script ran?
by graff (Chancellor) on Mar 05, 2003 at 05:21 UTC
    Is there someplace I could find out what ENV keys I should be expecting in general...

    Well, do you have access to each of the systems where this script is expected to run? If so, just run this command line on each system:

    perl -e 'print map { "$_ = $ENV{$_}\n" } sort keys %ENV'
    Another reply below has already mentioned %ENV keys that are specific to CGI, and any one of these should be common across systems...