Solved

php to perl

Posted on 2006-07-15
3
2,992 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 500 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now