> Hello world\n ;-) > > Im wondering about my perl. With this code: > #!/usr/local/bin/perl > > > use DBI; > use strict; > > print "Test\n"; > > > ::$my_user = "blabla"; > my $password = "bloobbloob"; > > my $logon = Adabas::logon("demo,adabas","mycomp:mydb"); > > I got somethink like that: > Global symbol "$chris_test_var" requires explicit package name at > ./komm-test2.pl line 9. > Execution of ./komm-test2.pl aborted due to compilation errors. >
Not with the code you provided, since it doesn't contain a $chris_test_var anywhere, and I get, Bad name after :: at ./test.pl line 13. Which is fixed by moving the $ sigil to in front of the ::my_user, which will then throw the warning about only being used once. Fixing that issue I then get, Test Undefined subroutine &Adabas::logon called at ./test.pl line 16. Which appears to be fine. > Is it not longer possible to set variables easly as globals? First I tryed > this with $my_user or $test_var... without "::", and the result was the same. This is being caused by the stictures being turned on and is a very good thing. You shouldn't be using globals anyways. Essentially you need to scope your variables with 'my' or 'our'. Read: http://perl.plover.com/FAQs/Namespaces.html which should help. > Is this something special with DBI? > Best way to tell is to remove the 'use DBI', but it isn't. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>