Solved

php to perl

Posted on 2006-07-15
3
3,041 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

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…
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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

628 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