Feral_Shade has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Is there a way to call a perl script and pass it a command line argument through a hyperlink? Thanks.

Replies are listed 'Best First'.
Re: Hyperlink Command Line Arguments
by grep (Monsignor) on Apr 17, 2003 at 23:37 UTC

    Depends on what you mean?

    If you mean
    pass an argument to 'perl' itself (eg. -d for debugger -v for version).
    Then no (without some kind of wrapper) that would also be very dangerous.

    If you mean
    a command line argument for your script.
    Then yes but you would want to use CGI. The CGI protocol is specifically built for passing arguments to a script through a hyperlink.
    To specifially send arguments as command lines arguments read this . I have never tried this method, so I cannot attest to the safety.
    IOW use at your own risk.
    IOW you're better off using CGI.pm and coding as a CGI application.

    I hope I'm answering your question. If not, please tell me what exactly you want to do.

    grep
    Mynd you, mønk bites Kan be pretti nasti...

      Yep, that's what I needed to know, thanks. :)