On Fri, 7 Apr 2006, Glenn Linderman wrote:
Seems like AS build 817 must have a compatibility problem with PAR. I can't
get PAR 0.92 (the latest) or PAR 0.85 (the oldest I had on hand) to build on
AS build 817. The previous version of Perl I'd used was AS 810, both of
those versions of PAR w
On Fri, 07 Apr 2006, Glenn Linderman wrote:
> Seems like AS build 817 must have a compatibility problem with PAR. I
> can't get PAR 0.92 (the latest) or PAR 0.85 (the oldest I had on hand)
> to build on AS build 817. The previous version of Perl I'd used was AS
> 810, both of those versions of PAR
- Original Message -
From: "Glenn Linderman"
.
.
> Rob (Sisyphus) was apparently eventually able to
> build PAR on his home-built Perl after some patches, but not (if I
> understand correctly) on AS 817.
You've misunderstood me a little there (which is not surprising given the
length of
Glenn Linderman wrote:
> On approximately 4/7/2006 12:11 PM, came the following characters from
> the keyboard of Nelson R. Pardee:
>
>>I've included timings for 1 iterations for each of the proposed
>>solutions.
>>
>>0.056398 s/\s(?=\s*\S)/0/og
>>0.254457 while (s/\s(?=(\d|\.))/0/ {)
>>0.
>
> Nelson,
>
> Please add Mark Thomas' solution to your timings to see how
> it compares
> to the others:
>
I'd be curious to see how Wags' sprintf compares as well:
s/^(\s+)/sprintf "%s", q[0]x length($1)/eg;
___
Perl-Win32-Users mailing list
Per
On Fri, 7 Apr 2006, Glenn Linderman wrote:
> On approximately 4/7/2006 12:11 PM, came the following characters from
> the keyboard of Nelson R. Pardee:
> > I've included timings for 1 iterations for each of the proposed
> > solutions.
> >
> > 0.056398 s/\s(?=\s*\S)/0/og
> > 0.254457 while (
May not have hit your inbox yet...
0.056398 s/\s(?=\s*\S)/0/og
0.254457 while (s/\s(?=(\d|\.))/0/ {)
0.094268 s/^(\s+)(?=\d)/'0'x(length $1)/e
0.026934 (see below) Strip front space, take length diff, replace with n x
"0"
0.095046 s/^(\s+)/sprintf "%s", q[0]x length($1)/eg
0.086842 s/ (?=.*\d)/0
Ken Kriesel wrote:
Why not the more concise
$string =~ s/^(\s+)/'0'x(length $1)/e;
Thanks, that is exactly the same as Paul's solution. Minus the spaces
around the 'x'.
--
Lyle Kopnicky
Software Project Engineer
Veicon Technology, Inc.
___
Per
Title: Secure Message Delivery
Secure Message Delivery
To ensure your privacy, we are securely delivering this email message to
Why not the more concise
$string =~ s/^(\s+)/'0'x(length $1)/e;
as in
my $string = ' 259.00 ';
print "<$string>\n";
#$string =~ s/^(\s+)(?=\d)/'0'x(length $1)/e;
$string =~ s/^(\s+)/'0'x(length $1)/e;
print "<$string>\n";
which outputs:
< 259.00 >
<0259.00 >
showing same spacin
Oops, I see I misattributed 2 lines.
my $string = ' 259.00 ';
print "<$string>\n";
#$string =~ s/^(\s+)(?=\d)/'0'x(length $1)/e; #Mike Arms posted
$string =~ s/^(\s+)/'0'x(length $1)/e; #Paul Sobey; quicker than above line
print "<$string>\n";
which outputs:
< 259.00 >
<0259.00 >
I've included timings for 1 iterations for each of the proposed
solutions.
0.056398 s/\s(?=\s*\S)/0/og
0.254457 while (s/\s(?=(\d|\.))/0/ {)
0.094268 s/^(\s+)(?=\d)/'0'x(length $1)/e
0.026934 (see below) Strip front space, take length diff, replace with n x "0"
0.095046 s/^(\s+)/sprintf "%s"
Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO
- USA Central Time Zone
636-755-2652 fax 636-755-2503
[EMAIL PROTECTED]
www.nisc.coop
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Nelson R. Pardee
> Sent: Friday, Ap
> Using a regex, I want to replace each leading space-character
> with a corresponding zero-character on a one-to-one basis.
> For an example
> string:
>
> My $string = ' 259.00 ';
>
> Note that I don't want to change the trailing space
> character. The resulting string would look like:
>
> -Original Message-
> From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 07, 2006 13:15
> To: Dirk Bremer; Perl-Win32-Users@listserv.ActiveState.com
> Subject: RE: Replace Leading Spaces
>
> > Using a regex, I want to replace each leading space-character
> > w
Try # 2:
The first is my new one using a positive lookahead assertion.
I've included timings for 1 iterations for each of the proposed
solutions.
0.056398 s/\s(?=\s*\S)/0/og
0.254457 while (s/\s(?=(\d|\.))/0/ {)
0.094268 s/^(\s+)(?=\d)/'0'x(length $1)/e
On Fri, 7 Apr 2006, Dirk Bremer wrote
Dirk Bremer wrote:
All right, in the mean time, I have come up with the following:
while (s/\s(?=(\d|\.))/0/) {}
This works nicely, but I' wondering if it can be accomplished without
looping and perhaps more efficiently as well.
Your thoughts?
I think that's kind of confusing. I like Paul'
On Fri, 7 Apr 2006, Nelson R. Pardee wrote:
> Don't know if this is the most efficient, but it seems to work for me...
> s/^(0?\s)/0/g;
Another brain fade!. This doesn't work.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
T
Don't know if this is the most efficient, but it seems to work for me...
s/^(0?\s)/0/g;
On Fri, 7 Apr 2006, Dirk Bremer wrote:
> Using a regex, I want to replace each leading space-character with a
> corresponding zero-character on a one-to-one basis. For an example
> string:
>
> My $string = '
[EMAIL PROTECTED] wrote:
> Using a regex, I want to replace each leading space-character with a
> corresponding zero-character on a one-to-one basis. For an example
> string:
>
> My $string = ' 259.00 ';
>
> Note that I don't want to change the trailing space character. The
> resulting string
Dirk Bremer [Dirk.Bremer AT nisc.coop] wrote:
> Using a regex, I want to replace each leading space-character with a
> corresponding zero-character on a one-to-one basis. For an example
> string:
>
> my $string = ' 259.00 ';
>
> Note that I don't want to change the trailing space character.
> -Original Message-
> From: Arms, Mike [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 07, 2006 11:37
> To: Perl-Win32-Users@listserv.ActiveState.com
> Cc: Dirk Bremer
> Subject: RE: Replace Leading Spaces
>
> Dirk Bremer [Dirk.Bremer AT nisc.coop] wrote:
> > Using a regex, I want to re
Using a regex, I want to replace each leading space-character with a
corresponding zero-character on a one-to-one basis. For an example
string:
My $string = ' 259.00 ';
Note that I don't want to change the trailing space character. The
resulting string would look like:
'0259.00 '
The t
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Dirk Bremer
> Sent: Friday, April 07, 2006 09:52
> To: Perl-Win32-Users@listserv.ActiveState.com
> Subject: Replace Leading Spaces
>
> Using a regex, I want to replace each leading space-character
> My $string = ' 259.00 ';
>
> Note that I don't want to change the trailing space character. The
> resulting string would look like:
>
> '0259.00 '
>
> The total length of the string would remain the same after the replace
> operation.
>
> I'm just having a total brain-fade on this on
Using a regex, I want to replace each leading space-character with a
corresponding zero-character on a one-to-one basis. For an example
string:
My $string = ' 259.00 ';
Note that I don't want to change the trailing space character. The
resulting string would look like:
'0259.00 '
The to
Using the attached WMIExplore.pl, enumerating the
Win32_PerfRawData_Tcpip_NetworkInterface class on most of my servers
gives information similar to the following:
D:\CVS\secure\scripts\SystemsMonitoring>WMIExplore.pl
Win32_PerfRawData_Tcpip_NetworkInterface l3pinfra1
Collecting WMI data from l3pin
On Apr 6, 2006, at 18:03, So Phal wrote:
Hi
I want to know whether using CGI and using pain html is faster or what?
If I use CGI to generate the html and write pain html code inside Perl
to generate Html. I believe write pain html inside Perl is more faster
then CGI generate html code.
Wha
At 03:03 PM 4/6/2006 -0700, So Phal wrote:
>I want to know whether using CGI and using pain html is faster or what?
>If I use CGI to generate the html and write pain html code inside Perl to
>generate Html. I believe write pain html inside Perl is more faster then CGI
>generate html code.
I assume
29 matches
Mail list logo