Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a .cgi and a .pl together

Status
Not open for further replies.

forces1

Programmer
Apr 5, 2007
29
NL
Hi guys,
I have a maybe strange question. I have some experience with perl, but not with perl modules (the .pm-files). I have a script that searches my database (search.cgi) and I have a script that gets search results from other sites, but that is a perl-module.

Now I want the 2 results (from the search.cgi and the .pm-file) together in one file, so that I can show them on one page. To do that, I probably must make it the same type of file. My question is: is it better to transform the .cgi-file into a .pm, or to transform the .pm into a .cgi-file? And is it anyway possible?

Thanks a lot.
 
If they are written in perl there is no difference in the files just the extensions. You can rename a .pl file to .cgi and the website treats it just like a .pl file.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
Yes, I understood that, but this isn't a .pl-file, but a .pm-file ;)
 
oops.. sorry.. I must have read that wrong.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
Can't you "require" or "use" the module in your search.cgi script?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
@Travs69: Sorry, it was my fault, I've put pl in the topic-title in stead of pm.

@KevinADC: Thanks, I will try that. I'll keep you informed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top