Up Prev Next
From: Xin_Li at WellspringRes dot com
Subject: RE: where does it come from? help please.
Date: Sep 27 1999 6:18PM
What's the meaning of $ in /\s*$/
> -----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
> > 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
> 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
> > Murali
> > > -----Original Message-----
> > > From: Michael Peppler [SMTP:firstname.lastname@example.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.