Solved

php to perl

Posted on 2006-07-15
3
3,017 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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl efficient DB Call 8 93
Parse csv file and generate graphs in HTML in bash 8 238
Replace  text in a file 2 114
perl getopt long help 34 71
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…

831 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