Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: syntax error near "){"

by Errto (Vicar)
on Nov 06, 2007 at 23:24 UTC ( #649365=note: print w/ replies, xml ) Need Help??


in reply to syntax error near "){"

It looks like you're trying to perform a server side include. This allows you to include the output of a CGI program in an otherwise static HTML page. But what you have here is not an HTML page but rather another CGI program. You can achieve this result, somewhat primitively, using the do function in Perl.

That should be enough to get you started. But I'd suggest taking this CGI you're trying to include and turn it into a module whose functions you can call from your main script. Try Simple Module Tutorial for starters if you're not familiar with modules.


Comment on Re: syntax error near "){"
Re^2: syntax error near "){"
by greymoose (Beadle) on Nov 07, 2007 at 05:58 UTC
    Thanks Errto. This is the first time I've tried to use a separate script instead of a subroutine to avoid duplication. I've followed both of those links and I'll probably give the Module option a go.
    Cheers,
    Phil

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://649365]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2014-09-17 23:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (101 votes), past polls