Re: setting program priority by PID

2005-03-04 Thread Ing. Branislav Gerzo
Bakken, Luke [BL], on Thursday, March 3, 2005 at 09:26 (-0800) wrote these comments: BL> Use Win32::Process: BL> http://search.cpan.org/~jdb/libwin32-0.24/Process/Process.pm thanks, now I can set priority of running program: use strict; use warnings; use Win32::Process::Info; use Win32::Process;

encoding script pain

2005-03-04 Thread Saurabh Singhvi
#!/usr/bin/perl -w use strict; opendir(DIR,".") or die "Couldn't open $!"; our @names = readdir(DIR) or die "Couldn't open $!"; closedir(DIR); foreach my $name (@names){ if ($name =~ /avi$/) { my $var = $name; $var =~ s/\s/\\ /; $var =~ s/\[

Re: call a perl script within another perl script

2005-03-04 Thread Chris Devers
On Thu, 3 Mar 2005, Nishi Prafull wrote: > I would like to call a perl script(B.pl) within another perl script > (A.pl). Should I use the following approach or something else? > > A.pl > - > my $cmd = "perl B.pl" > system($cmd); > > Please let me know. Is there a reason that A.pl can't jus

Re: Net::DNS

2005-03-04 Thread John Doe
Hello Thanks much for your answer Am Mittwoch, 2. März 2005 15.15 schrieb Wiggins d'Anconia: > John Doe wrote: > [...] > >My logic says that a condition in the form > >if ($a != $val1 or $a != $val2) > >is always true. > > Unless both are false which is a basic premise of 'or'. I

Re: Net::DNS

2005-03-04 Thread John Doe
Hello Derek Am Mittwoch, 2. März 2005 17.19 schrieb [EMAIL PROTECTED]: > [...] > > btw: If the 1st FOR LOOP loop failed, @a is empty, so maybe you should > > move the last 3 lines in the 1st FOR LOOP if branch. > > tkx for the pointer! So here is what you mean? > > > foreac

Re: encoding script pain

2005-03-04 Thread Vladimir D Belousov
First, your regext could be $var =~ s/[\s\[\]]/\\$1/g; Next, you should use two arguments style "system" calls: system("/usr/local/bin/programm", args); Third, you have to analyze a return code of a "system" command: my $status = system(...); print "Error [errno = $status]\n" if($status); Saurabh

RedHat, ttyS0 and perl

2005-03-04 Thread Giff Hammar
I am writing a small perl program that takes the serial output from our phone switch and puts the individual call records into a Postgres database. Everything works except for the part where I have to open the serial port. I am on RedHat EL 4 and perl 5.8.5. The serial port is /dev/ttyS0, which I k

Re: RedHat, ttyS0 and perl

2005-03-04 Thread Wiggins d'Anconia
Giff Hammar wrote: I am writing a small perl program that takes the serial output from our phone switch and puts the individual call records into a Postgres database. Everything works except for the part where I have to open the serial port. I am on RedHat EL 4 and perl 5.8.5. The serial port is /d

RE: Defined revisited

2005-03-04 Thread Larsen, Errin M HMMA/IT
> Sorry to bother you, since I notice other people have also > been asking > about defined. But the answers to their questions have not > helped me to > this point. No problem. That's what we're here for. As long as you've put in the time to try to solve the problem yourself (which it loo

Establishing a TLS connection to a LDAP server

2005-03-04 Thread Aurelien Magniez
Hi, I've read a great article about connecting securely to LDAP using PHP (http://www.novell.com/coolsolutions/trench/5838.html). It works nice :-) I would like now to authenticate the both sides when establishing the TLS tunnel. In other words, my OpenLDAP requires a client certificate. After s

Re: Net::DNS

2005-03-04 Thread DBSMITH
How would I get all hosts for a particular domain using Net::DNS? I tried *.domainname in my query. thanks, "Wiggins d'Anconia"

Re: Net::DNS

2005-03-04 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: How would I get all hosts for a particular domain using Net::DNS? I tried *.domainname in my query. Do you mean how to see all the subdomains in a domain's zone file? How would you have do that manually via CLI? (IE not using Perl or other custom program, just SSH into a

Hash headaches

2005-03-04 Thread Terry Poperszky
I am working on a bit of logic to be used in a script that copies new files to a temporary directory and I am stumped. Basically what I want to accomplish is to be able to look for the existence of a file name in a log file, and I am trying to use a hash to accomplish this. $directory is the l

Re: Hash headaches

2005-03-04 Thread Jenda Krynicky
From: "Terry Poperszky" <[EMAIL PROTECTED]> > I am working on a bit of logic to be used in a script that copies new > files to a temporary directory and I am stumped. Basically what I > want to accomplish is to be able to look for the existence of a file > name in a log file, and

Can Perl 'nice' a process?

2005-03-04 Thread Dave Kettmann
Im sure Perl can nice a process but I guess I dont know what the correct term is. I guess if I just start with the correct term I can discover how to use it. Then again, I may just have to 'nice' it in the shell. Any help is appreciated. Thanks, Dave Kettmann NetLogic 314-266-400 1-888-MYNETLOG

RE: Hash headaches

2005-03-04 Thread Charles K. Clarkson
Terry Poperszky <[EMAIL PROTECTED]> wrote: : Suggestions/Observations? Don't use external commands to get directory contents. Use 'openddir' and 'readdir' instead. : open MYFILE, ") { : $dir_log{chomp($_)} = 1; 'chomp' will not return a file name here. I think you want this

Re: Net::DNS

2005-03-04 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: pshrapprd:/home/root> nslookup Default Server: svr Address: 192..x.x.x set type=a s Server: svr Address: 192..x.x.x *** svr can't find s:Non-existent host/domain ls Server: svr.* Address: 192.x.x.x Name:ls ? Commands: (identifiers are shown in uppercase,

UNIX vs. Windows help

2005-03-04 Thread Paul Ohashi
Hi All, I moved my web server from UNIX to Windows and some things no longer work. I expected this to happen, but now I need some help. Here's what worked on UNIX: my @ftpUpList = `ftp ftp.somewhere.com

writting a detailed log

2005-03-04 Thread Tim Wolak
All, I am writtting this script for a client that will transfer their files via SFTP and write a small log to their system. I would also like it to write a log on our server as well, other than just doing what I have, writting the date and the file transfered. What can I do to capture erros f

print to a log

2005-03-04 Thread Nishi Prafull
Hi: I am running an external command through my perl script and I wanted to print out the command output to some log file -- my $log = "/tmp/test.log"; my $cmd1 = qq{ ade useview viewname -exec 'ade label_product \\ -l $label -noinsert -prod dc' -print >> $log }; syst

RE: UNIX vs. Windows help

2005-03-04 Thread Paul Ohashi
I figured it out with a google search (google always works). The results returned: http://www.robvanderwoude.com/index.html Paul -Original Message- From: Paul Ohashi [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 1:40 PM To: Perl List (E-mail) Subject: UNIX vs. Windows help Hi

Re: UNIX vs. Windows help

2005-03-04 Thread JupiterHost.Net
Paul Ohashi wrote: Hi All, Hello, I moved my web server from UNIX to Windows and some things boy talk about a downgrade :) no longer work. I expected this to happen, but now I need some help. Here's what worked on UNIX: my @ftpUpList = `ftp ftp.somewhere.com < This would put a recursive listing of

Re: Net::DNS

2005-03-04 Thread JupiterHost.Net
My goal is to attain all the devices that have an object class of "Server" and an object class of pc if and only if this entry has a comment referring to "TSM." What does this have to do with listing all the subdomains in a zone for a domain liek in your other email? i don't think anyone is able

Re: UNIX vs. Windows help

2005-03-04 Thread JupiterHost.Net
Paul Ohashi wrote: I figured it out with a google search (google always works). The results returned: Also see http://search.cpan.org/~gbarr/libnet-1.19/Net/FTP.pm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Net::DNS

2005-03-04 Thread DBSMITH
Because I am trying to find a way to get all the clients in a domain via Net::DNS and see if there is an existant "object class" with Server in it. But using Net::DNS I believe will not help b/c I think the website uses java script. Again, here is my problem that needs solved. thank you, There i

reg exp

2005-03-04 Thread DBSMITH
I have the file as attached and I want to take 104 and 356 to get a sum. Here is my code: while () { if ( $. > 6 ) { if ( $_ !~ "ANR*" or $_ !~ "ANS*" ) { print FFF $_; } } next unless $_ /

Re: reg exp

2005-03-04 Thread John Doe
Hello (again) Derek Am Samstag, 5. März 2005 05.06 schrieb [EMAIL PROTECTED]: > I have the file as attached and I want to take 104 and 356 to get a sum. > Here is my code: > > > while () { > if ( $. > 6 ) { > if ( $_ !~ "ANR*" or $_ !~ "ANS*" ) { >

Re: reg exp

2005-03-04 Thread John W. Krahn
[EMAIL PROTECTED] wrote: I have the file as attached and I want to take 104 and 356 to get a sum. Here is my code: while () { if ( $. > 6 ) { if ( $_ !~ "ANR*" or $_ !~ "ANS*" ) { print FFF $_; } }

Re: encoding script pain

2005-03-04 Thread John W. Krahn
Saurabh Singhvi wrote: #!/usr/bin/perl -w use strict; opendir(DIR,".") or die "Couldn't open $!"; our @names = readdir(DIR) or die "Couldn't open $!"; closedir(DIR); foreach my $name (@names){ if ($name =~ /avi$/) { my $var = $name; $var =~ s/\s/\\ /;

Re: Can Perl 'nice' a process?

2005-03-04 Thread John W. Krahn
Dave Kettmann wrote: Im sure Perl can nice a process but I guess I dont know what the correct term is. I guess if I just start with the correct term I can discover how to use it. Then again, I may just have to 'nice' it in the shell. There is nothing built in to Perl that will do this. You would h