How to best count the number of words in a sentence?

2006-03-23 Thread Foo Ji-Haw
Hi all, This is probably a fun trivial question: I'd like to count the number of words in a string. My command: my $count = split(/\s+/,$line); works. But Perl complains about: Use of implicit split to @_ is deprecated It works, but it's deprecated. I can assign split to an array, then do a

RE: How to best count the number of words in a sentence?

2006-03-23 Thread Chris
Hi all, This is probably a fun trivial question: I'd like to count the number of words in a string. My command: my $count = split(/\s+/,$line); works. But Perl complains about: Use of implicit split to @_ is deprecated It works, but it's deprecated. I can assign split to an array, then do a sc

Get Service Description

2006-03-23 Thread eyal edri
Hi ,   I'm using Win32:::OLE('in') to retrive win32 service names (such as alerter).   I am looking for a function/method to retrve the desc or full name of the service.   this is what i use:    my $objWMIService = Win32::OLE->GetObject("winmgmts:$ip\\root\\CIMV2") or die "WMI connection fail

Win32::OLE versions

2006-03-23 Thread Bullock, Howard A.
My build 816 states: Many bundled modules have been updated to their latest versions: Digest-SHA-2.11 HTML-Tagset-3.10 HTML-Parser-3.50 HTML-Tree-3.1901 IO-String-1.08 libwww-perl-5.805 Mac-Errors-1.11 Win32-OLE-0.1704 But when I used Visual Package Manager to ins

RE: How to best count the number of words in a sentence?

2006-03-23 Thread Furnish, Trever G
Just ask for the scalar. Not that I'm saying this is the best way, but at least you're not keeping the array: my $count = scalar split(/\s+/,$line); -t. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Sent: Thursday, March 23, 2006 9:24 AM To: 'F

RE: Get Service Description

2006-03-23 Thread Paul Sobey
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of eyal edri > Sent: 23 March 2006 16:38 > To: perl-win32-users@listserv.ActiveState.com > Subject: Get Service Description > I'm using Win32:::OLE('in') to retrive win32 service names > (such as ale

RE: Reg Expression Help

2006-03-23 Thread Dirk Bremer
Try '^[\[\]a-zA-Z0-9-_. ]+$' 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 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Reg Expression Help

2006-03-23 Thread Scott Purcell
Hello,   I have a regular _expression_ in which I am ensuring the user enters some valid characters for our system. Currently the _expression_ is so: '^[a-zA-Z0-9-_. ]+$' Meaning, a user can enter a-z or A-Z or 0-9, dashes, underbars or periods and space.   I have a problem now, bec

RE: Get Service Description

2006-03-23 Thread Steven Manross
:) Steven my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Service", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); foreach my $objItem (in $colItems) { print "Name: ". $objItem->{Name}; print "DisplayName: ". $objItem->{DisplayName}; }

RE: Reg Expression Help

2006-03-23 Thread Bullock, Howard A.
Scott wrote: How can I incorporate the possibility of having a [ or ] in the user input? /^[a-zA-Z0-9-_. \[\]]+$/ ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysub

RE: Get Service Description

2006-03-23 Thread Ng, Bill
If you want to go the easy way:   use Win32::Service;   Bill in Brooklyn From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eyal edriSent: Thursday, March 23, 2006 11:38 AMTo: perl-win32-users@listserv.ActiveState.comSubject: Get Service Description Hi ,   I'm using Win32:::O

RE: Reg Expression Help

2006-03-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
  -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Scott PurcellSent: Thursday, March 23, 2006 12:05To: Perl-Win32-Users@listserv.ActiveState.comSubject: Reg _expression_ Help Hello,   I have a regular _expression_ in which I a

RE: Reg Expression Help

2006-03-23 Thread Joe Discenza
Scott Purcell wrote, on Thursday, March 23, 2006 3:05 PM   : '^[a-zA-Z0-9-_. ]+$'   The others helped you get [] in there. But hyphen (dash) has to be first, or it looks like a range operator. So try:   ^[-a-zA-Z0-9_. \[\]]+$   Good luck,   Joe   ___

Possible DynaLoader or MinGW bug?

2006-03-23 Thread Robert May
I've run into an 'interesting' issue when building some of my own XS extensions - I've narrowed the issue somewhat, but am about at the limit of my knowledge (or possibly already beyond it). Can anyone else duplicate the problem? My setup: Win98 Perl 5.8.7 Activestate build 813 MingW (gcc 2.3

Re: Possible DynaLoader or MinGW bug?

2006-03-23 Thread Sisyphus
- Original Message - From: "Robert May" . . > Steps to invoke problem: > (1) run: h2xs -A -n SomeModule > (2) cd into the created SomeModule directory > (3) run the incantation: > perl -MConfig_m Makefile.PL > nmake > nmake test > > Generally this works fine, and

RE: Reg Expression Help

2006-03-23 Thread lim Ee Wah
Hi, I think you should escape that period and dash as well.'^[a-zA-Z0-9-_. \[\]]+$''^[a-zA-Z0-9\-_\. \[\]]+$'or may be simpler:'^[\w\d_\-\. \[\]]+$' ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://list