Re: Perl newb

2003-08-29 Thread Carl Jolley
On Thu, 28 Aug 2003, C. Church wrote: if ($comment =~ /\a?(.*?)/) { } It says that if the contents of $comment match the regular expression on the right, execute the block following. As for the RE: /\a?(.*?)/ the \a? means 1 or 0 alarms -- this is only superfluous because it is not

Re: Octetstr to hex conversion

2003-08-29 Thread $Bill Luebkert
Jim Lancaster wrote: I'm polling a Linux server with Net-SNMP and getting back an octetstr value for the mac address of the nic. I saw a reference to using unpack to convert it in an old posting, but no specifics. How is this done? What kind of mask do I use? Not sure - can you supply a

RE: Perl newb

2003-08-29 Thread Gerber, Christopher J
-Original Message- From: Roger Keane [mailto:[EMAIL PROTECTED] (.*?): match zero or more characters, maybe. The question mark is redundant. It also sets $1 to the matched value. Afaik, the ? after the * specifies a non greedy match, so that for the string: abchowdydef

stopping a running process

2003-08-29 Thread just me
hi i have a program that executes and generates a log file and it will stay there collecting logs till user intervention like Ctrl C. If i wanted to write a perl script and schedule it to stop the program after a certain time , how do i do it?? any ways? thanks

Win32::ODBC Issue

2003-08-29 Thread Martin, Stanley G [GMG]
I'm trying to add a bunch of ODBC connections to a server using the Oracle ODBC Driver. The version of the Driver is 8.01.07.00 using the following piece of code: Win32::ODBC::ConfigDSN(ODBC_ADD_SYS_DSN, Oracle ODBC Driver, DSN=cdc,

RE: Filter text in log file

2003-08-29 Thread Chris
Chris wrote: I know this may be very simple, but I'm still learning. I have a log file that looks like: /home/cluster_httpd/sites/something.com /home/cluster_httpd/sites/something.com/certs /home/cluster_httpd/sites/something.com/web

Filter text in log file

2003-08-29 Thread Chris
Well, this is a rundown of what is working, but it's slow due to the number of lines. - Chris open (THE_INPUT,/home/filelist.txt) || die can\'t open filelist.log: $!; while(THE_INPUT) { chomp; push (@FILTERED_LINES,$_) if (-f $_); } close THE_INPUT; foreach $thing (@FILTERED_LINES)

Re: stopping a running process

2003-08-29 Thread Carl Jolley
On Thu, 28 Aug 2003, just me wrote: hi i have a program that executes and generates a log file and it will stay there collecting logs till user intervention like Ctrl C. If i wanted to write a perl script and schedule it to stop the program after a certain time , how do i do it?? any ways?

Re: stopping a running process

2003-08-29 Thread $Bill Luebkert
just me wrote: hi i have a program that executes and generates a log file and it will stay there collecting logs till user intervention like Ctrl C. If i wanted to write a perl script and schedule it to stop the program after a certain time , how do i do it?? any ways? You could start

Re: Filter text in log file

2003-08-29 Thread $Bill Luebkert
Chris wrote: Chris wrote: I know this may be very simple, but I'm still learning. I have a log file that looks like: /home/cluster_httpd/sites/something.com /home/cluster_httpd/sites/something.com/certs /home/cluster_httpd/sites/something.com/web

Re: Filter text in log file

2003-08-29 Thread Glenn Linderman
On approximately 8/28/2003 2:58 PM, came the following characters from the keyboard of Chris: Well, this is a rundown of what is working, but it's slow due to the number of lines. - Chris open (THE_INPUT,/home/filelist.txt) || die can\'t open filelist.log: $!; while(THE_INPUT) { chomp; push

Installing local packages with PPM

2003-08-29 Thread Catalin Borcea
How can I install a local, already donwloaded, package using PPM? In Active Perl 5.6.x this works by simply issuing the ppm install command from the package directory. In AP 5.8.0, PPM always tries to connect to the Internet repositories. TIA - catalin -

Re: TK::JPEG

2003-08-29 Thread Sisyphus
Randy Kobes wrote: If I remember correctly, I built the jpeg library separately, and installed that and the header files. Makefile.PL then had to be tweaked to not attempt to build the included jpeg library, and instead LIBS and INC attributes were adjusted within WriteMakefile() to point to

RE: Installing local packages with PPM

2003-08-29 Thread Scott Campbell
What you need to do is create a Local repository. For example, suppose you have your package(s) in c:\ppms. You would type ppm rep add c:\ppms. Now that the local repository is created, you need to make sure the .ppd file is pointing to the .tgz file correctly (IE: path, etc). After that, you

RE: WMI wierdness.

2003-08-29 Thread Jim Lancaster
Here is the offending sub: sub os_info { # From the WMI documentation. These are the possible values for # OSProductSuite: my %os_product_suite = ( 1 = Small Business, 2 = Enterprise, 4 = BackOffice, 8 = Communication Server,

Confused by getOpenFile.

2003-08-29 Thread Beckett Richard-qswi266
Guys, I'm writing a Tk GUI based script, and I am using getOpenFile to load in the file I need to work on. I was just working on a section where I write to a text file the path and name of the last opened file, so that the next time you use the script, it defaults to trying to open the last file

RE: HTML Colors

2003-08-29 Thread Peter Eisengrein
Title: RE: HTML Colors Yeah, it would be 24, wouldn't it. There I go typing faster than I can think again. Duh. -Original Message- From: Carl Jolley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 27, 2003 5:38 PM To: Peter Eisengrein Cc: 'Ricardo Oliva'; [EMAIL PROTECTED]

RE: Octetstr to hex conversion

2003-08-29 Thread Peter Eisengrein
Title: RE: Octetstr to hex conversion Is this what you mean? my $hex = unpack(h*,pack(b*,$octetstr)); -Original Message- From: Jim Lancaster [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 28, 2003 11:30 AM To: [EMAIL PROTECTED] Subject: Octetstr to hex conversion I'm

RE: Filter text in log file

2003-08-29 Thread Chris
-Original Message- Glenn Linderman Sent: Friday, August 29, 2003 1:05 AM Subject: Re: Filter text in log file /home/cluster_httpd/sites/something.com /home/cluster_httpd/sites/something.com/certs /home/cluster_httpd/sites/something.com/web

IO::Socket and IO::Select in use of client

2003-08-29 Thread Jer
hello all, I am wondering if anyone can give me a simple down-to-earth example of a non-blocking socket CLIENT using IO::Socket and IO::Select on the Win32 platform. There are alot of complex examples of non-blocking socket servers on the www, but no simple client code. Your help is much

unlink doesn't

2003-08-29 Thread Robert Shields
my $logdir = $Server-Mappath (logs); if (!opendir (LOGDIR, $logdir)) { $Response-write (Could not open directory $logdir: $!br/); } else { my @files = grep (/.*\.xml/, readdir(LOGDIR)); @files = sort @files; @files = sort {$b cmp $a} @files; my $nCount

RE: unlink doesn't

2003-08-29 Thread Messenger, Mark
Title: RE: unlink doesn't Try changing: unlink $file; to unlink $logdir\\$file; HTH :) -Original Message- From: Robert Shields [mailto:[EMAIL PROTECTED]] Sent: Friday, August 29, 2003 9:34 AM To: [EMAIL PROTECTED] Subject: unlink doesn't my $logdir = $Server-Mappath

RE: unlink doesn't

2003-08-29 Thread Peter Eisengrein
Title: RE: unlink doesn't Probably a permissions issue, but it could be other things. Try unlink $file || warn Couldn't remove file $file : $!\n; ... or use die if you want it to stop on the first failure. -Original Message- From: Robert Shields [mailto:[EMAIL PROTECTED]] Sent:

RE: WMI wierdness.

2003-08-29 Thread Carl Jolley
On Fri, 29 Aug 2003, Jim Lancaster wrote: Here is the offending sub: sub os_info { # From the WMI documentation. These are the possible values for # OSProductSuite: my %os_product_suite = ( 1 = Small Business, 2 = Enterprise, 4 =

Re: unlink doesn't

2003-08-29 Thread Carl Jolley
On Fri, 29 Aug 2003, Robert Shields wrote: my $logdir = $Server-Mappath (logs); if (!opendir (LOGDIR, $logdir)) { $Response-write (Could not open directory $logdir: $!br/); } else { my @files = grep (/.*\.xml/, readdir(LOGDIR)); @files = sort @files; @files =