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: Xin_Li at WellspringRes dot com
Subject: RE: Remove Leading Whitespaces
Date: Sep 28 1999 12:29PM

Thanks so much for all of you!!!

> -----Original Message-----
> From:	Simon Haven [SMTP:Simon.Haven@wdr.com]
> Sent:	Tuesday, September 28, 1999 4:49 AM
> To:	SybPerl Discussion List
> Subject:	Re: Remove Leading Whitespaces
> 
> I found "Learning Perl"  was a very good intro to Perl - just the right
> pace and level of information to get started.
> But "Programming Perl" is the book I use most.
> Both are published by O'Reilly and are money very well spent.
> 
> 
> Begin forwarded message:
> 
> From: Michael Peppler 
> Date: Mon, 27 Sep 1999 16:24:33 -0700 (PDT)
> To: SybPerl Discussion List 
> Subject: RE: Remove Leading Whitespaces
> In-Reply-To:
> 
> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs  Lucid
> Reply-To: SYBPERL-L@listproc.net
> Sender: owner-SYBPERL-L@listproc.net
> X-Listprocessor-Version: 8.2.07 -- ListProc(tm) by CREN
> 
> Xin_Li@WellspringRes.com writes:
>  > ^ means bitwise logical xor. How can I make sense of ^ in s/^\s*//?
> 
> No.
> 
> ^ means bitwise logica xor when used like this:
> 
> 	$baz = $foo ^ $bar;
> 
> However, inside of a m// or s/// operation there are characters that
> serve as operators that are quite different from the normal stuff.
> 
> >From the command line, run
> 	perldoc perlre
> to read the perl manual on regular expressions, and also go to your
> local bookstore and browse the perl section - there are a few very
> good books that your should look into (I like Effective Perl
> Programming, but I'm not sure how good that book is for a beginner...)
> 
> Michael
> 
>  > > -----Original Message-----
>  > > From:	Ravipudi, Murali [SMTP:Murali.Ravipudi@gs.com]
>  > > Sent:	Monday, September 27, 1999 2:44 PM
>  > > To:	SybPerl Discussion List
>  > > Subject:	RE: Remove Leading Whitespaces
>  > > 
>  > > 
>  > > 
>  > > > From:	Xin_Li@WellspringRes.com [SMTP:Xin_Li@WellspringRes.com]
>  > > > Sent:	Monday, September 27, 1999 2:41 PM
>  > > > To:	SybPerl Discussion List
>  > > > Subject:	Remove Leading Whitespaces
>  > > > 
>  > > > Thanks. But if I want to remove the leading spaces or whitespaces,
> how
>  > > > should I do?
>  > > > 
>  > > 	[Ravipudi, Murali]  
>  > > 
>  > > 	A  s/^\s*//  will 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    -||-    > > > > Int. Sybase User Group  -||-    > > > > Sybase on Linux mailing list: ase-linux-list@isug.com
>  > 
> 
> -- 
> Michael Peppler         -||-  Data Migrations Inc.
> mpeppler@peppler.org    -||-   Int. Sybase User Group  -||-   Sybase on Linux mailing list: ase-linux-list@isug.com
> 
> 
> 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.