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
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:
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
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
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
On Fri, Feb 08, 2002 at 12:39:59PM -0600, Khamneian, Mahtaj wrote:
> while($line = )
> {
chomp $line;
>my @login=split(/:/,$line);
Ronald
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
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
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
- 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
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.
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
> 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
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
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
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
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
17 matches
Mail list logo