RE: Perl DBI->connect

2002-02-08 Thread Jeff Urlwin
Mahtaj, Try chomp($line); before the split. Jeff > > After some debugging using DBI->trace, I found out the value of > the password is not passed correctly to DBI->connect (hard coding > the password directly in connect worked). Apparently "split" is > attaching something (eoln?) t

RE: Perl DBI->connect

2002-02-08 Thread Khamneian, Mahtaj
The script works beautifully. Thanks a bunch to all who helped. -Mahtaj > -Original Message- > From: Cliff Nadler [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 08, 2002 1:39 PM > To: Douglas Wilson > Cc: Khamneian, Mahtaj; [EMAIL PROTECTED] > Subject: Re:

Re: Perl DBI->connect

2002-02-08 Thread Cliff Nadler
True, it should be chomp $line; my @login=split(/:/,$line); On Fri, 8 Feb 2002, Douglas Wilson wrote: > > From: "Cliff Nadler" <[EMAIL PROTECTED]> > > >my @login=split(/:/,chomp($line)); > > This does not do what you think it does. > 'chomp' returns the number of characters removed. > Check

Re: Perl DBI->connect

2002-02-08 Thread Douglas Wilson
From: "Cliff Nadler" <[EMAIL PROTECTED]> >my @login=split(/:/,chomp($line)); This does not do what you think it does. 'chomp' returns the number of characters removed. Check the docs. HTH, Douglas Wilson

RE: Perl DBI->connect

2002-02-08 Thread Cliff Nadler
Make this line: my @login=split(/:/,$line); be this: my @login=split(/:/,chomp($line)); You are getting hit with the end-of-line character. On Fri, 8 Feb 2002, Khamneian, Mahtaj wrote: > After some debugging using DBI->trace, I found out the value of the password is not >passed corre

Re: Perl DBI->connect

2002-02-08 Thread Ronald J Kimball
On Fri, Feb 08, 2002 at 12:39:59PM -0600, Khamneian, Mahtaj wrote: > while($line = ) > { chomp $line; >my @login=split(/:/,$line); Ronald

RE: Perl DBI->connect

2002-02-08 Thread Khamneian, Mahtaj
After some debugging using DBI->trace, I found out the value of the password is not passed correctly to DBI->connect (hard coding the password directly in connect worked). Apparently "split" is attaching something (eoln?) to the password value which makes it invalid when passed to oracle via co

RE: Perl DBI->connect

2002-02-08 Thread Khamneian, Mahtaj
Michael A Chase [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 07, 2002 11:37 PM > To: Bart Lateur; [EMAIL PROTECTED] > Subject: Re: Perl DBI->connect > > > - Original Message - > From: "Bart Lateur" <[EMAIL PROTECTED]> > To: <[EMAIL

Re: Perl DBI->connect

2002-02-08 Thread Bart Lateur
On Thu, 7 Feb 2002 21:36:40 -0800, Michael A Chase wrote: >> On Thu, 7 Feb 2002 12:14:02 -0800, Michael A Chase wrote: >> >> ># You don't need to disconnect, each assignment to $dbh does that for >you. >> >> If only with a warning. > >You get a warning if you let the program exit without disconne

Re: Perl DBI->connect

2002-02-07 Thread Michael A Chase
- Original Message - From: "Bart Lateur" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 07, 2002 19:14 Subject: Re: Perl DBI->connect > On Thu, 7 Feb 2002 12:14:02 -0800, Michael A Chase wrote: > > ># You don't need to dis

Re: Perl DBI->connect

2002-02-07 Thread Bart Lateur
On Thu, 7 Feb 2002 12:14:02 -0800, Michael A Chase wrote: ># You don't need to disconnect, each assignment to $dbh does that for you. If only with a warning. -- Bart.

Re: Perl DBI->connect

2002-02-07 Thread Jared Still
should make the script wait a little after each > disconnect. Any suggestions/comments? > > Thanks a lot for the pointer, > > -Mahtaj > > > -Original Message- > > From: Jared Still [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, February 07, 2002 11:07 A

Re: Perl DBI->connect

2002-02-07 Thread Michael A Chase
> From: "Khamneian, Mahtaj" <[EMAIL PROTECTED]> > To: "Khamneian, Mahtaj" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, February 07, 2002 10:20 > Subject: RE: Perl DBI->connect > > Well, apparently my suspicion was not corre

RE: Perl DBI->connect

2002-02-07 Thread Khamneian, Mahtaj
ging into DBNAME as USER2/PASS2#this password is correct Segmentation Fault > -----Original Message- > From: Khamneian, Mahtaj > Sent: Thursday, February 07, 2002 11:34 AM > To: Jared Still; [EMAIL PROTECTED] > Subject: RE: Per

RE: Perl DBI->connect

2002-02-07 Thread Khamneian, Mahtaj
IL PROTECTED]] > Sent: Thursday, February 07, 2002 11:07 AM > To: Khamneian, Mahtaj; [EMAIL PROTECTED] > Subject: Re: Perl DBI->connect > > > > Are you sure you're using DBI? > > If the password is incorrect, the connection should fail. > > The behav

Re: Perl DBI->connect

2002-02-07 Thread Jared Still
Are you sure you're using DBI? If the password is incorrect, the connection should fail. The behavior you describe is typical of Sqlplus. Assuming that you have a scott/tiger account, the following script should simply fail and report an error: ( change the value of $db first ) #!/usr/bin/per

Perl DBI->connect

2002-02-07 Thread Khamneian, Mahtaj
I have written a perl DBI script to check passwords of some 1500 users on an oracle database. I have set up a loop to go through a list containing userid:password of each user on a separate line. I use DBI->connect to connect to the instance using the userid/password from the list. If connectio