Re: PAR fails on AS build 817

2006-04-07 Thread Randy Kobes
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

RE: PAR fails on AS build 817

2006-04-07 Thread Jan Dubois
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

Re: PAR fails on AS build 817

2006-04-07 Thread Sisyphus
- 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

Re: Replace Leading Spaces (fwd)

2006-04-07 Thread $Bill Luebkert
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.

RE: Replace Leading Spaces

2006-04-07 Thread Peter Eisengrein
> > 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

Re: Replace Leading Spaces (fwd)

2006-04-07 Thread Nelson R. Pardee
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 (

RE: Replace Leading Spaces

2006-04-07 Thread Nelson R. Pardee
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

Re: Replace Leading Spaces

2006-04-07 Thread Lyle Kopnicky
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

RE: Perl-Win32-Users Digest, Vol 27, Issue 6 [Possible SPAM]

2006-04-07 Thread Steven Pennie
Title: Secure Message Delivery Secure Message Delivery   To ensure your privacy, we are securely delivering this email message to

RE: Replace Leading Spaces

2006-04-07 Thread Ken Kriesel
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

RE: Replace Leading Spaces

2006-04-07 Thread Ken Kriesel
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 >

RE: Replace Leading Spaces (fwd)

2006-04-07 Thread 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.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"

RE: Replace Leading Spaces

2006-04-07 Thread Dirk Bremer
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

RE: Replace Leading Spaces

2006-04-07 Thread Thomas, Mark - BLS CTR
> 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: >

RE: Replace Leading Spaces

2006-04-07 Thread Dirk Bremer
> -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

RE: Replace Leading Spaces

2006-04-07 Thread Nelson R. Pardee
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

Re: Replace Leading Spaces

2006-04-07 Thread Lyle Kopnicky
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'

Re: Replace Leading Spaces

2006-04-07 Thread Nelson R. Pardee
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

Re: Replace Leading Spaces

2006-04-07 Thread Nelson R. Pardee
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 = '

RE: Replace Leading Spaces

2006-04-07 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[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

RE: Replace Leading Spaces

2006-04-07 Thread Arms, Mike
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.

RE: Replace Leading Spaces

2006-04-07 Thread Dirk Bremer
> -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

Re: Replace Leading Spaces

2006-04-07 Thread Trevor Joerges
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

RE: Replace Leading Spaces

2006-04-07 Thread Dirk Bremer
> -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

RE: Replace Leading Spaces

2006-04-07 Thread Paul Sobey
> 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

Replace Leading Spaces

2006-04-07 Thread Dirk Bremer
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

WMI Querying - Slightly OT

2006-04-07 Thread Paul Sobey
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

Re: CGI OR NOT

2006-04-07 Thread DZ-Jay
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

Re: CGI OR NOT

2006-04-07 Thread Chris Wagner
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