Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Do you know where your variables are?
 
PerlMonks  

Re: my program will run on my computer but not in CGI

by fauria (Deacon)
on Jan 31, 2005 at 21:44 UTC ( [id://426791]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to my program will run on my computer but not in CGI

To ensure it is not a wrong data handling trouble (its likely to be a write privileges problem), what about using XML for config files? For the config file, you can try something like:

<opt>
  <section1>
   <param1>foo</param1>
   <param2>bar</param2>
  </section1>
  <section2>
   <other>foobar</other>
  </section2>
</opt>

And then, use something like this to read, modify and update your config file:

use strict; use XML::Simple; my $config = "fooconf.xml"; my $xml = XMLin($config) or die "Error reading config: $!"; $xml->{section1}{param1} = "replacement1"; $xml->{section2}{other} = "replacement2"; open CONF, ">$config" or die "Error writing config: $!"; print CONF XMLout($xml, NoAttr => 1); close CONF;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://426791]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.