PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Ravipudi, Murali" <Murali dot Ravipudi at gs dot com>
Subject: RE: where does it come from? help please.
Date: Sep 27 1999 4:31PM

But in this case, if some one has space(s) at the end in his/her password,
it fails...

Murali

> -----Original Message-----
> From:	Michael Peppler [SMTP:mpeppler@peppler.org]
> Sent:	Monday, September 27, 1999 11:40 AM
> To:	SybPerl Discussion List
> Cc:	SybPerl Discussion List
> Subject:	Re: where does it come from? help please.
> 
> Simon Haven writes:
>  > It could be that you have your password column declared as a CHAR(xx),
> where xx is longer than the length of the password.
>  > Sybase will space-fill to the length of a CHAR value, but not for a
> VARCHAR.
>  > 
> 
> 
> 
>  > 
>  > Maybe you could try adding rtrim() in the query, or else declaring the
> password field as a varchar, or converting to varchar in the query.
>  > 
>  > You should be able to remove trailing spaces in perl using chop(), but
> be careful.
>  > NB, make sure you're using chop, not chomp, which only removes a
> newline.
> 
> Use s/// instead of chop (eg $var =~ s/\s*$//;)
> 
> Michael
> 
> 
>  > Sender: owner-SYBPERL-L@listproc.net
>  > Date: Mon, 27 Sep 1999 18:13:39 +0200
>  > From: Konrad Zak 
>  > Organization: University of Wroclaw
>  > X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586)
>  > X-Accept-Language: en
>  > To: SybPerl Discussion List 
>  > Subject: where does it come from? help please.
>  > Reply-To: SYBPERL-L@listproc.net
>  > X-Sender: konrad@szermierz
>  > X-Listprocessor-Version: 8.2.07 -- ListProc(tm) by CREN
>  > 
>  > Hello.
>  >     I'm a little new to perl and sybperl and I think it's why I'm in
>  > trouble.
>  > I'm trying to provide simple login procedure. Problem is, that
> PASSWORD,
>  > read
>  > from table USERS in the way shown below (in order to compare with typed
>  > one),
>  > has some additional char. Printed, it looks like that: 'my_pass ', real
>  > password doesn't have anything like that.                      ^
>  >                                                             here is
>  > problem
>  > 
>  > I've tried to remove it with chop() function, it doesn't work, do
> anyone
>  > know
>  > what's wrong, please?
>  > 
>  > [...]
>  > 
>  > use Sybase::CTlib;
>  > $d = new Sybase::CTlib okis_www_guest,my_passwd;
>  > 
>  > $SQL_query = "select PASSWORD from USERS where LOGIN =
>  > \"$frmFlds{'login'}\"";
>  > $ref = $d->ct_sql($SQL_query);
>  > 
>  > if (@$ref->[0][0] eq $frmFlds{'password'})
>  > {
>  > 
>  > [...]
>  > 
>  > ----------------------------------------------------------
>  >   Konrad Zak
>  >   The Interfaculty Lab of Computer Networks and Software
>  >   University of Wroclaw, Wroclaw, POLAND
>  >   +48 71 3201416
>  > 
>  > 
>  > This message contains confidential information and is intended only 
>  > for the individual named.  If you are not the named addressee you 
>  > should not disseminate, distribute or copy this e-mail.  Please 
>  > notify the sender immediately by e-mail if you have received this 
>  > e-mail by mistake and delete this e-mail from your system.
>  > 
>  > E-mail transmission cannot be guaranteed to be secure or error-free 
>  > as information could be intercepted, corrupted, lost, destroyed, 
>  > arrive late or incomplete, or contain viruses.  The sender therefore 
>  > does not accept liability for any errors or omissions in the contents 
>  > of this message which arise as a result of e-mail transmission.  If 
>  > verification is required please request a hard-copy version.  This 
>  > message is provided for informational purposes and should not be 
>  > construed as a solicitation or offer to buy or sell any securities or 
>  > related financial instruments.
>  > 
> 
> -- 
> Michael Peppler         -||-  Data Migrations Inc.
> mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
> Int. Sybase User Group  -||-  http://www.isug.com
> Sybase on Linux mailing list: ase-linux-list@isug.com