Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705331

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:20:04+00:00 2026-06-13T03:20:04+00:00

I have a third party Perl script designed to be executed by a browser

  • 0

I have a third party Perl script designed to be executed by a browser and which processes data in a HTTP POST request.

The script can be executed from the command line but when doing so it is not being executed in the expected environment and as such does not have access to required user data.

I need to execute the script very frequently and want to avoid the overhead of spinning up an Apache process to handle what can instead be handled at the command line. The script executes from the command line much much much faster than via Apache (at least with no input data).

I’d like to wrap up the script such that command line arguments are passed to the script as if they were present in a HTTP POST request.

I’m not very familiar with Perl and would like to present a (rudimentary) example in PHP to represent what I intend to achieve.

<?php

$_POST['example1'] = $argv[1];
$_POST['example2'] = $argv[2];

include /var/www/thirdPartyScript.php

?>

The Perl script accesses data as follows:

#!/usr/bin/perl -T

use CGI 3.40 qw(-newstyle_urls -private_tempfiles redirect);
# ...
my $q = CGI->new();
# ...
if ($q->param('example1') {

} else {

}

What would the wrapper script need to set such that the third party script has access to relevant data as if that data were provided in a HTTP POST request?

  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:20:06+00:00Added an answer on June 13, 2026 at 3:20 am

    If the third party script is CGI, you can provide the parameters on the command line:

    your_script.pl name1=value1&name2=value2
    

    See more details on how to test the POST and GET methods in the CGI.pm documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a third party flash object which i can manipulate through a javascript
I have a third party script that is including jquery (which causes things to
I have a python script which must call a perl script to get data
I have a third-party product, a terminal emulator, which provides a DLL that can
I a have third party function which I use in my program. I can't
I have third-party C code that writes data to a file. I want to
I have a third party SDK in C# which has class names like this:
I have a third-party library (the interface to Xerox's Finite State tools) which come
I have a third party c dll which I want to use in my
I have a third party program which basically allows users to send email and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.