in reply to backtick in perl 5.8 cgi under iis 6

Use the function readdir instead of backticks. See perldoc -f readdir.

Neil Watson
watson-wilson.ca

Replies are listed 'Best First'.
Re^2: backtick in perl 5.8 cgi under iis 6
by cseelig (Initiate) on Feb 16, 2006 at 22:13 UTC
    Hi. Actually, "dir" is a stand-in for the real external job.
    The problem is that I can't get anything to work with backticks in cgi.
      I think you are missing the point. You should never need backticks. They are a security risk. Why don't you tell us exactly what you are trying to do?

      Neil Watson
      watson-wilson.ca

        That's assuming user input is used to build the command string. If the command is hardcoded, or if interpolated data is well validated (matches /^\w+\z/, for example), there's no problem.
        The cgi code wants to "run" an external process and capture its output for processing.

        BTW - it's an intranet application; security is not a concern.

        How can I achieve this without backticks?

        Thanks.