Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] require "config.txt"??

Expand Messages
  • john gale
    I think the easiest method of doing that would be use a config.pl file instead of a text file. this way, you can store things like [ $bgcolor = black ; ]
    Message 1 of 2 , May 31, 2003
    • 0 Attachment
      I think the easiest method of doing that would be use a 'config.pl'
      file instead of a text file. this way, you can store things like [
      $bgcolor = "black"; ] in that file and then call them directly from
      this main file, like [ print "<body bgcolor=$bgcolor>\n"; ]. The
      config.pl file should be just like another executable .pl file, with [
      #!/usr/bin/perl ] at the top, except the bottom line should be [ return
      1; ] so that your script doesn't quit after requiring that file.

      ciao,


      ~ john


      On Saturday, May 31, 2003, at 05:15 PM, Sara wrote:

      > How to call the variables from the config file using CGI. pm?
      >
      > #!/usr/bin/perl
      >
      > use CGI;
      > my $q = new CGI;
      >
      > require "config.txt";
      >
      > print "Variables_from_the_config_file";
      >
      > ???????
      >
      > Thanks,
      >
      > Sara.

      =================
      support the arts!
      www.smadness.com

      updated Jan 21 2003
    Your message has been successfully submitted and would be delivered to recipients shortly.