>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
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
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
#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,
>
&
: 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
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
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
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
Has anyone used the whitespace module. I downloaded it from CPAN but I
couldn't get it to work for me at all.
YM
> 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 =
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
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
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
13 matches
Mail list logo