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

Re: [PBML] Unitialised Value ?

Expand Messages
  • Nathan.Jeffrey@dhs.vic.gov.au
    I d use.... my $domain = $ENV{SERVER_NAME} || unknown ; It s probably missing the SERVER_NAME env variable until the second or third invocation, maybe? N
    Message 1 of 3 , Sep 3, 2002
    • 0 Attachment
      I'd use....

      my $domain = $ENV{SERVER_NAME} || "unknown";

      It's probably missing the SERVER_NAME env variable until the second or
      third invocation, maybe?

      N





      Gordon Stewart <gordon@...>
      04/09/2002 04:01 PM
      Please respond to perl-beginner


      To: perl-beginner@yahoogroups.com
      cc:
      Subject: [PBML] Unitialised Value ?




      my $domain =$ENV{SERVER_NAME};

      if ($domain eq "tview.kwister.com") {$site="nz";}
      if ($domain eq "tdview.kwister.com") {$site="dis";}


      Why will I get these messages :-

      [Wed Sep 4 17:57:40 2002] C:\sambar50\cgi-bin\test\view.cgi: Use of
      uninitialized value in string eq at C:\sambar50\cgi-bin\test\view.cgi line
      58.
      [Wed Sep 4 17:57:40 2002] C:\sambar50\cgi-bin\test\view.cgi: Use of
      uninitialized value in string eq at C:\sambar50\cgi-bin\test\view.cgi line
      59.


      Ive 'initialised' the $domain variable just 2-3 lines above - & I want to
      compare it to a particular domain name

      Ive tried == & eq

      Any advise ?

      This partcular code is new to this script (combining 2 sets of scripts
      into
      one script) however I havnt been 'bamboozled' by this error before now -

      I usually resolve it within 10-20 minutes..

      I AM using warnings & strict..

      G.

      ----------


      ---
      Outgoing mail is certified Virus Free.
      Checked by AVG anti-virus system (http://www.grisoft.com).
      Version: 6.0.384 / Virus Database: 216 - Release Date: 21/08/02


      [Non-text portions of this message have been removed]



      Unsubscribing info is here:
      http://help.yahoo.com/help/us/groups/groups-32.html

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/







      _________________________________________________________________________________

      This email contains confidential information intended only for the person named above and may be subject to legal privilege. If you are not the intended recipient, any disclosure, copying or use of this information is prohibited. The Department provides no guarantee that this communication is free of virus or that it has not been intercepted or interfered with. If you have received this email in error or have any other concerns regarding its transmission, please notify Postmaster@...
      _________________________________________________________________________________
    • Gordon Stewart
      ... Hmm - its working now - thanks..... Normally I test things on my home server - But ive GOT to do this on the ISP server - test for sub-domain).. G. ...
      Message 2 of 3 , Sep 4, 2002
      • 0 Attachment
        At 16:02 4/09/02 +1000, you wrote:

        >I'd use....
        >
        >my $domain = $ENV{SERVER_NAME} || "unknown";
        >
        >It's probably missing the SERVER_NAME env variable until the second or
        >third invocation, maybe?
        >
        >N


        Hmm - its working now - thanks.....

        Normally I test things on my home server - But ive GOT to do this on the
        ISP server - test for sub-domain)..

        G.

        ----------


        ---
        Outgoing mail is certified Virus Free.
        Checked by AVG anti-virus system (http://www.grisoft.com).
        Version: 6.0.384 / Virus Database: 216 - Release Date: 21/08/02


        [Non-text portions of this message have been removed]
      • Gordon Stewart
        Is there a way to Trace the line numbers - ON-LINE.. Ie - I cant test it on my home server - but when i upload to the web, it produces no headers - & I m
        Message 3 of 3 , Sep 4, 2002
        • 0 Attachment
          Is there a way to "Trace" the line numbers - ON-LINE..

          Ie - I cant test it on my home server - but when i upload to the web, it
          produces no "headers" - & I'm trying to figure out what line number it
          started printing...

          On my home server - it doesnt tell me that error...

          G.

          ----------


          ---
          Outgoing mail is certified Virus Free.
          Checked by AVG anti-virus system (http://www.grisoft.com).
          Version: 6.0.384 / Virus Database: 216 - Release Date: 21/08/02


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.