Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

php to perl

Posted on 2006-07-15
3
Medium Priority
?
3,047 Views
Last Modified: 2008-03-17
$strXmlData = isset($_POST['domainID']) ? $_POST['domainID'] : null;

what is the perl equivalent?

isset($_GET['domainID']) ? $_GET['domainID'] : null;

is converted to

 $q->param('domainID') ? $q->param('domainID') : '';

but I'm not sure if the code should be different for POST vs. GET..
0
Comment
Question by:kesea
3 Comments
 
LVL 28

Accepted Solution

by:
FishMonger earned 2000 total points
ID: 17116210
>> but I'm not sure if the code should be different for POST vs. GET..

No, you don't need to change to code.  The CGI module can import either post or get submissions with the same code.

Here's a shorter method.

$strXmlData = $q->param('domainID') || '';
0
 

Author Comment

by:kesea
ID: 17257799
so sorry, that answer helped me out, I just forgot to accept it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question