On Thu, 19 Dec 2013 12:27:09 -0600
Rick T <[email protected]> wrote:

> I wanted to make the program more portable, which means changing the
> name of the server. My idea was to put the following
> 
>       my $server = “newserver”
> 
> at the beginning of the code, then have the later lines of code use
> this string. That way I’d only have to change the one line when
> moving to another server. What I tried first was
> 
>       use constant TMPL_FILE => "/big/dom/x” . $server .
> “/www/templates/open_courses3.html";
> 
> This gave me a syntax error, as did several variants I tried.

What did the error say?

If the above code is verbatim, it's because you missed the trailing
semicolon after the variable definition - i.e.:

  my $server = "newserver";



-- 
David Precious ("bigpresh") <[email protected]>
http://www.preshweb.co.uk/     www.preshweb.co.uk/twitter
www.preshweb.co.uk/linkedin    www.preshweb.co.uk/facebook
www.preshweb.co.uk/cpan        www.preshweb.co.uk/github



--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to