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
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
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
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
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
> -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
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
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
:)
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};
}
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
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
-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
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
___
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
- 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
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
16 matches
Mail list logo