RE: removing white space

2002-11-22 Thread Mark Anderson
>I tried to lookup the "perldoc -q" on the net but couldn't find anything? >(www.perldoc.com right?) perldoc is software that generally is installed with perl. perldoc.com has the same information, but doesn't have a way to use the flags that the software version has. The -q flag to perldoc sear

Re: removing white space

2002-11-22 Thread John W. Krahn
Mariusz wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > > > How to remove whitespace at the end (or beginning) of a string is a > > Frequently Asked Question. > > > > perldoc -q "How do I strip blank space from the beginning/end of a > > string" > > Thanks for replying. > My text data co

Re: removing white space

2002-11-22 Thread david
Mariusz wrote: > Thank you for your response. I went to perldoc on the net and couldn't > find any examples or more info on "-q space" > > Mariusz > > on your machine, try the following in the command line: perldoc -q space david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: removing white space

2002-11-22 Thread Mariusz
#x27;t find anything? (www.perldoc.com right?) Mariusz - Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 22, 2002 2:50 AM Subject: Re: removing white space > Mariusz K wrote: > > > > Hi, > &

Re: removing white space

2002-11-22 Thread Mariusz
: Friday, November 22, 2002 1:29 AM Subject: Re: removing white space > On Fri, 22 Nov 2002, Mariusz K wrote: > > > Hi, > > > > One part of my script ads several strings into one: > > $text = $part1.$part2.$part3.(...etc) > > > > However, if the part3 thro

Re: removing white space

2002-11-22 Thread John W. Krahn
Mariusz K wrote: > > Hi, Hello, > One part of my script ads several strings into one: > $text = $part1.$part2.$part3.(...etc) > > However, if the part3 through part10 were empty I get that many white spaces > at the end of $text. I thought the best thing would be just to remove the > spaces at

Re: removing white space

2002-11-21 Thread Sudarshan Raghavan
On Fri, 22 Nov 2002, Mariusz K wrote: > Hi, > > One part of my script ads several strings into one: > $text = $part1.$part2.$part3.(...etc) > > However, if the part3 through part10 were empty I get that many white spaces > at the end of $text. I thought the best thing would be just to remove th

removing white space

2002-11-21 Thread Mariusz K
Hi, One part of my script ads several strings into one: $text = $part1.$part2.$part3.(...etc) However, if the part3 through part10 were empty I get that many white spaces at the end of $text. I thought the best thing would be just to remove the spaces at the end, but how? (maybe search and r

Re: removing white space

2001-06-27 Thread Yvonne Murphy
Has anyone used the whitespace module. I downloaded it from CPAN but I couldn't get it to work for me at all. YM

RE: removing white space

2001-06-26 Thread Peter Cornelius
> Is the following regrex the correct way to remove leading or > trailing white space > from a string? > > $data = "[EMAIL PROTECTED] (mike smith)" > > $data =~ s/(^\s+)|(\s+$)//g; This looks like it works to me. > or would it be more efficient to it thus: > > # two passes > $data =

Re: removing white space

2001-06-26 Thread Jos I. Boumans
Hey david, this regexp will do the trick for you: $_ = '[EMAIL PROTECTED] (mike smith)'; s/^\s+|\s+$//g; you dont need the parenthesis around it, unless you want to capture the whitespace (which seems futile) i'd say compiling a regexp twice would be more of a drain on system resources t

Re: removing white space

2001-06-26 Thread Jeff 'japhy' Pinyan
On Jun 26, David Gilden said: >Is the following regrex the correct way to remove leading or trailing >white space from a string? Use two passes. >$data =~ s/^\s+)//; >$data =~ s/\s+$)//; Err, extra )'s in there. $data =~ s/^\s+//; $data =~ s/\s+$//; -- Jeff "japhy" Pinyan [EMAIL PR

removing white space

2001-06-26 Thread David Gilden
Is the following regrex the correct way to remove leading or trailing white space from a string? $data = "[EMAIL PROTECTED] (mike smith)" $data =~ s/(^\s+)|(\s+$)//g; or would it be more efficient to it thus: # two passes $data =~ s/^\s+)//; $data =~ s/\s+$)//; Final comment when I am