Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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.

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://649365]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-02-25 18:16 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (314 votes). Check out past polls.