RegEx - Please Help

2002-10-18 Thread RTO RTO
Hello Friends, I am confused and hence coded a small RegEx statement. I am now having more questions. Would appreciate, if you can help: Here is my code: C:\>perl -e "$str = 'null knot'; $str=~m/(null(?!\s?not))/; print $+;" The Output is: null Question 1: Should I not expect the full string '

RE: Simple RegEx Question

2002-09-11 Thread RTO RTO
Thanks Nikola and Bob. Would "anchoring with \z" tantamount to having a trailing "$"? In other words, are the following expressions one and the same? /^[0-9a-fA-F]+\z/ /^[0-9a-fA-F]+$/ __ Yahoo! - We Remember 9-11: A tribute to the more than 3

RE: Simple RegEx Question

2002-09-11 Thread RTO RTO
use strict; while(){ chomp; if(/[^0-9a-fA-F]+/){ print("$_ is not a hexadecimal number!\n"); }else{ print("$_ is a hexadecimal number!\n"); } } __DATA__ f4dxf ffaa99 gxad 2832 2842da --- Nikola Janceski <[EMAIL PROTECTED]> wrote: > give us a snippet of your code. you made a mist

RE: Simple RegEx Question

2002-09-11 Thread RTO RTO
ll the cases correctly, except for empty strings. Hence the question. Thanks, Rex --- Nikola Janceski <[EMAIL PROTECTED]> wrote: > see below > > /^[^0-9a-fA-F]+$/ #if this evals to true string is > NOT > > ## start of string ^ and end of string $ > > -Or

Simple RegEx Question

2002-09-11 Thread RTO RTO
Here is a RegEx that I am using to check if the given string is Hexadecimal or not. /[^0-9a-fA-F]+/ #if this evals to true string is NOT hex I am having a trailing "+" to make sure at least one permissible character is present. Yet, it matches an empty string as a hex string. a) What am I mis

Re: Window Services - stop/start (Newbie)...

2002-09-10 Thread RTO RTO
Try Win32::Service. Functions of interest are: StopService($hostName, $svcName); StartService($hostName, $svcName); PauseService($hostName, $svcName); ResumeService($hostName, $svcName); You can execute any of the functions of this module on remote-servers attached to the same network that you

RE: How to find all active windows hosts on a network

2002-09-10 Thread RTO RTO
uot;Kipp, James" wrote:you can also just use 'nbtstat -c'. > -Original Message- > From: RTO RTO [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 6:07 PM > To: Timothy Johnson; 'Mark Richmond'; [EMAIL PROTECTED] > Subject: RE: How to find

Add a user-function to Perl core????

2002-09-10 Thread RTO RTO
I am not sure if this would be inane to ask. But here is a dilemma: I have three functions, ltrim, rtrim and trim. As the function names adumbrate, each of them trims white-spaces -- the usual trimming stuff. Since, these functions do not exist in Perl and of course I can club them together in

Re: $_ variable question

2002-09-09 Thread RTO RTO
only named iterators. Thanks, Rex Michael Fowler wrote: On Mon, Sep 09, 2002 at 02:29:24PM -0700, RTO RTO wrote: Out of curiousity, why do you prefer not to use a named iterator? They're often more readable than the ever-implicit $_, especially if you end up referring to the variable explicit

RE: How to find all active windows hosts on a network

2002-09-09 Thread RTO RTO
I ran this one-liner, and it did return all the Windows NT/2000/Servers/Workstations attached to my domain/workgroup. C:\>perl -e "use Win32::NetAdmin; my($serverRef) = {}; Win32::NetAdmin::GetServers('', 'MYDOMAINNAME', SV_TYPE_SERVER, $serverRef); while(my($key, $val) = each %{$serverRef}){prin

Fwd: RE: $_ variable question

2002-09-09 Thread RTO RTO
Note: forwarded message attached. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com --- Begin Message --- Tim -- Thanks for your rejoinder. Mostly, I do use 'aliased' variables within nested loops. However, t

$_ variable question

2002-09-09 Thread RTO RTO
Friends: I have an outerloop with a list and so do I have an inner loop with another list. $_ variable points to list in the outer-loop or inner-loop depending upon the scope. I prefer to not use aliases. In such a case, when I am in the scope of inner loop, can I access the looping variable on

$_ variable question

2002-09-09 Thread RTO RTO
Friends: I have an outerloop with a list and so do I have an inner loop with another list. $_ variable points to list in the outer-loop or inner-loop depending upon the scope. I prefer to not use aliases. In such a case, when I am in the scope of inner loop, can I access the looping variable on