Hi Gang,

Can anyone help me to fix this Perl code ?
I've installed Perl and MRTG on NT.
I'm attempting "perl mrtg mrtg.cfg" which is producing
the following error : "Cannot find location of MRTG
executable"
I am in the run directory as I should be WHERE MRTG
file IS ???

PS : I already tweaked the code from its default of
Unix to NT so that aint the problem.

Oh ... If you can, please recommend me a good Perl
book or two. I'm fluent in 'C'/'C++'.

Regards,

Phil.


>>>>> MRTG offending code START
  # We need to find the place where mrtg is installed,
and
  # then take the .pm and rateup programms from there.
  $main::binpath ="";

  if ($0 =~ /^(.+\Q${main::SL}\E)/) { 
$main::binpath="$1";

 } else {
    foreach $pathname ( split ${main::PS},
$ENV{'PATH'}) {
      if ((($main::OS eq 'NT') &&
           (-e "$pathname${main::SL}$0")) ||
           (-x "$pathname${main::SL}$0")) {
        $main::binpath=$pathname;
        last;
      }
    }
  }
  die "ERROR: Can\'t find location of mrtg
executable\n" 
    unless $main::binpath; 
  unshift (@INC,$main::binpath);
}
>>>>> MRTG offending code END


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to