Problem compiling SNMP::Util

2002-12-06 Thread Anthony . Kernan
I'm having problems compiling perl mod SNMP::Uitl, I get the following error when I do a make test. Any help would be greatly appreciated. gotgraphs# make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/libdata/perl/5.00503/mach -I/usr/libdata/perl/5.00503 -e 'use Test::Harness

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
Thanks, it's working now. I couldn't get the perl kill to work, it kept dieing. I used system("kill $mypid") and it kills everything :-). Thanks again -Original Message- From: Paul Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 10:18 AM To: [EMAIL PROTECTED] Cc: [E

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
Thanks for your replies. I understand that system() returns an exit code when it is done. My problem is that the command to be run by system() is not getting the variable. Here is the error I get when I run the script... 98299 usage: kill [-s signal_name] pid ... kill -l [exit_status]

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
As a test I would print $mypid and it had the correct pid number in it. Here is the complete script, if it will help... #!/usr/bin/perl -w use strict; use File::Find; my $dir = '/usr/local/etc/mrtg'; my $ext = '.pid'; my (@dirstruct); my $mypid; find(\&wanted,$dir); foreach my $afile (@dirstru

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
Here is the complete script... #!/usr/bin/perl -w use strict; use File::Find; my $dir = '/usr/local/etc/mrtg'; my $ext = '.pid'; my (@dirstruct); my $mypid; find(\&wanted,$dir); foreach my $afile (@dirstruct) { $mypid = system("cat $afile"); chop($mypid); print "Killing instance..."

Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
I've written a script to search for all *.pid files in a dir, then do a cat on the file. The script will then use this variable to kill the process. The problem I'm having is that the varibale is not being read correctly. I run the script and the kill process tries to run without the variable.