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: "Binit Amin" <bva72 at hotmail dot com>
Subject: Re: Remove Leading Whitespaces
Date: Sep 27 1999 7:42PM

Hi,

You would type $var =~ s/^\s*//;

Binit


>From: Xin_Li@WellspringRes.com
>Reply-To: SYBPERL-L@listproc.net
>To: SybPerl Discussion List 
>Subject: Remove Leading Whitespaces
>Date: Mon, 27 Sep 1999 14:41:16 -0400
>MIME-Version: 1.0
>From owner-SYBPERL-L@listproc.net Mon Sep 27 11:49:05 1999
>Received: from [204.153.50.13] by hotmail.com (2.1) with ESMTP id 
>MHotMailB9B9071F0074D82197E9CC99320DAD9C0; Mon Sep 27 11:49:05 1999
>Received: from localhost (localhost [127.0.0.1])by list.cren.net 
>(8.9.3/8.9.3) with SMTP id OAA02838;Mon, 27 Sep 1999 14:41:34 -0400 (EDT)
>Received: from wjbs0003xch.fl.wellspringres.com (wellspringres.com 
>[208.14.17.29])by list.cren.net (8.9.3/8.9.3) with ESMTP id OAA02828for 
>; Mon, 27 Sep 1999 14:41:27 -0400 (EDT)
>Received: by wjbs0003xch.fl.wellspringres.com with Internet Mail Service 
>(5.5.2448.0)id ; Mon, 27 Sep 1999 14:41:23 -0400
>Message-ID: 
>
>X-Mailer: Internet Mail Service (5.5.2448.0)
>Sender: owner-SYBPERL-L@listproc.net
>X-Listprocessor-Version: 8.2.07 -- ListProc(tm) by CREN
>
>Thanks. But if I want to remove the leading spaces or whitespaces, how
>should I do?
>
> > -----Original Message-----
> > From:	Michael Peppler [SMTP:mpeppler@peppler.org]
> > Sent:	Monday, September 27, 1999 2:30 PM
> > To:	SybPerl Discussion List
> > Subject:	RE: where does it come from? help please.
> >
> > Xin_Li@WellspringRes.com writes:
> >  > What's the meaning of $ in  /\s*$/
> >
> > End of the string. The reg-exp means "all the whitespace at the end of
> > the string"
> >
> > Michael
> >
> >  >
> >  > > -----Original Message-----
> >  > > From:	Simon Haven [SMTP:Simon.Haven@wdr.com]
> >  > > Sent:	Monday, September 27, 1999 1:05 PM
> >  > > To:	SybPerl Discussion List
> >  > > Subject:	Re: where does it come from? help please.
> >  > >
> >  > >
> >  > > >
> >  > > > But in this case, if some one has space(s) at the end in his/her
> >  > > password,
> >  > > > it fails...
> >  > >
> >  > > No it won't fail, it's doing exactly what rtrim() would do.
> >  > >  /\s*$/ will find zero or more occurrences of whitespace before the
> > end of
> >  > > line.
> >  > > However, if I read my definition of "\s" right in the Camel book, 
>it
> > WILL
> >  > > remove the newline - which may not be a problem, but might be worth
> >  > > knowing.
> >  > >
> >  > > Simon
> >  > >
> >  > > >
> >  > > > Murali
> >  > > >
> >  > > > > -----Original Message-----
> >  > > > > From:	Michael Peppler [SMTP:mpeppler@peppler.org]
> >  > >
> >  > > 
> >  > > > >
> >  > > > >  > NB, make sure you're using chop, not chomp, which only 
>removes
> > a
> >  > > > > newline.
> >  > > > >
> >  > > > > Use s/// instead of chop (eg $var =~ s/\s*$//;)
> >  > > > >
> >  > > > > Michael
> >  > >
> >  > > 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
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com