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

[PBML] something to do with require . .

Expand Messages
  • pang khong lin
    this is part of the contents for test.pl $REQUIRE_DIR= c: taform cgi-bin ; push(@INC,$REQUIRE_DIR) if $REQUIRE_DIR; require test2.pl ; sub1(); and so on .
    Message 1 of 1 , Sep 1, 1998
      this is part of the contents for test.pl

      push(@INC,$REQUIRE_DIR) if $REQUIRE_DIR;
      require 'test2.pl';
      and so on . . .

      this is part of the contents for test.pl

      sub sub1 {
      print "firstvar=$firstvar";
      print "secondvar=$secondvar";
      print "firstvar=$firstvar";
      print "secondvar=$secondvar";

      basically what i want to try out is the scope of variables using 'my'
      and 'local' and whether they behave the same when the subroutine is in
      the same program and when the subroutines are in separate files( which
      will then require us to use -> require 'filename'; )

      The problem is when the program reaches line 3 of test.pl the following
      mess. appears :-

      test2.pl did not return a true value at test.pl line3. <IN> chunk 3

      and the program stops.

      i have make sure that path is correct and i had even omit the value of
      $REQUIRE_DIR since both of the file is in the same dir.

      thanks in advance.



      List Site: http://www.findmail.com/list/perl-beginner/
      To unsubscribe, send to perl-beginner-unsubscribe@...

      FREE group e-mail lists at http://www.findmail.com
    Your message has been successfully submitted and would be delivered to recipients shortly.