Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: syntax error near "){"

by Errto (Vicar)
on Nov 06, 2007 at 23:24 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://649365]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-20 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found