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

Unitialised Value ?

Expand Messages
  • Gordon Stewart
    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
    Message 1 of 3 , Sep 3 11:01 PM
    • 0 Attachment
      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]
    • jake@thegoop.com
      maybe its missinterpreting the . s ? if ($domain eq tview .kwister .com ) {$site= nz ;} if ($domain eq tdview .kwister .com ) {$site= dis ;} maybe??? ...
      Message 2 of 3 , Sep 3 11:15 PM
      • 0 Attachment
        maybe its missinterpreting the "."s ?

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

        maybe???

        At 11:01 PM 9/3/2002, you wrote:


        >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).>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]
        >
        >
        >Yahoo! Groups Sponsor
        >ADVERTISEMENT
        >
        >Unsubscribing info is here:
        ><http://help.yahoo.com/help/us/groups/groups-32.html>http://help.yahoo.com/help/us/groups/groups-32.html
        >
        >
        >Your use of Yahoo! Groups is subject to the
        ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.



        [Non-text portions of this message have been removed]
      • Charles K. Clarkson
        ... This is similar to the code you posted for bannerside1.pm. Might I suggest that you drop $domain completely. Just use $ENV{SERVER_NAME} directly. my
        Message 3 of 3 , Sep 4 4:15 AM
        • 0 Attachment
          Gordon Stewart [mailto:gordon@...] wrote:
          :
          : 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..

          This is similar to the code you posted for bannerside1.pm.
          Might I suggest that you drop $domain completely. Just use
          $ENV{SERVER_NAME} directly.

          my $domain1 = $ENV{SERVER_NAME};

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

          $t{nz}="bannernz.list";
          $t{disabled}="bannerdis.list";
          $bannerlist = $t{$site};

          $t{nz}="bannersidenz.list";
          $t{disabled}="bannersidedis.list";
          my $bannerside1 = $t{$site};

          Would become something like:

          if ( $ENV{SERVER_NAME} ) {

          if ( $ENV{SERVER_NAME} eq 'tview.kwister.com' ) {
          # $bannerlist = 'bannernz.list';
          $bannerside1 = 'bannersidenz.list';

          } elsif ( $ENV{SERVER_NAME} eq 'tdview.kwister.com' ) {
          # $bannerlist = 'bannerdis.list';
          $bannerside1 = 'bannersidedis.list';

          } else {
          # Different server.
          }

          } else {
          # No server name listed.
          }

          I commented the lines with $bannerlist because
          it wasn't used in the module. If one of your subdomains
          is the default domain this could be shortened.

          if ( $ENV{SERVER_NAME} eq 'tview.kwister.com' ) {
          # $bannerlist = 'bannernz.list';
          $bannerside1 = 'bannersidenz.list';

          } else { # default to tdview.kwister.com
          # $bannerlist = 'bannerdis.list';
          $bannerside1 = 'bannersidedis.list';
          }


          HTH,

          Charles K. Clarkson
          --
          Head Bottle Washer,
          Clarkson Energy Homes, Inc.
          Small commercial and residential rehabilitation specialists.
          254 968-8328

          CJ Web Work - Solutions for Real Estate Investors.
          972 216-4952

          CJ Web Hosting - Lookout; We have one whole paying customer!
          254 968-8328
        Your message has been successfully submitted and would be delivered to recipients shortly.