"Johnson, Shaunn" wrote:

> Howdy:
>
> I want to move my perl script from Linux to Windows NT.
> The Linux script connects to Oracle via the DBI modules I
> have installed.  I want to do the same on NT, but I'm not
> sure if the connection strings / values are the same.
>
> In the linux script:
>
> [snip]
> use strict;
> use diagnostics;
> use DBI;
> use POSIX 'strftime';
>
> my $host='192.168.1.100';
> my $sid='testdb';
> my $username='scott';
> my $password='tiger';
> my $datestr=strftime '%d%m%Y',localtime;
>
> # connection option
> my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $username,
> $password, { RaiseError => 1 }) or die "Can not connect: $!";
> [/snip]
>
> Win:32 errors:
>
> [errors]
> D:\test\tmo_connect>test.pl
> Use of uninitialized value in concatenation (.) or string at
> D:/Perl/site/lib/DBI.pm line 584.
> DBI connect('host=192.168.1.100;sid=testdb','scott',...) failed:  at
> D:\test\tmo_connect\test.pl line 19
> Can not connect:  at D:\test\tmo_connect\test.pl line 19.
> [/errors]

It's way too early to be looking at system errors.  You could waste a
lot of time casting about in the wrong direction.

First isolate which variables are undefined by taking the name-value
pairs in the connect line, assembling them and printing them one-by-one,
and see which one raises this unitinitialized variable warning.  That
will give you a better idea of which part of the constructor call is
missing its intial value.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to