.------[ pike wrote (2002/10/14 at 14:17:46) ]------
 | 
 |  hi folks,
 |  
 |  i got a little problem with pasting variables into my modul funktion it 
 |  simple looks like this ...
 |  
 |  ##############################################
 |  my $update = Net::DNS::Update->new($vars{zone});
 |      my $res = Net::DNS::Resolver->new;
 |         my $nameserver1 = $vars{server};
 |         $res->nameservers($nameserver1);
 |  
 |  
 |              #build the updatestring.
 |      my $updatestring = $vars{name}.'.'.$vars{zone}.' '.$vars{ttl}.' 
 |  '.$vars{flag}.' '.$blankIP;
 |  
 |  
 |      $update->push("update", rr_add($updatestring));
 |      #$update->sign_tsig($key_name, $key);
 |  
 |      $reply = $res->send($update);
 |  ###################################################
 |  my config vars are saved in a hash called %vars ... server,name,zone eg...
 |  and now perl should parse the ip of the nameserver in the 
 |  $res->nameserver(); 
 |  but it wount work :
 |   
 |  my $nameserver1 = $vars{server};
 |         $res->nameservers($nameserver1);
 |  
 |  neither
 |  
 |   $res->nameservers($vars{server});
 |  
 |  neither with  ' ' or " "
 |  
 |  but this work :(
 |  
 |  $res->nameservers('192.168.1.13');
 |  
 `-------------------------------------------------

    Could it be that $vars{server} doesn't contain any data? Try placing
    a print statement just before $res->nameservers($nameserver1) and
    print out $nameserver1 to make sure there is data in that hash
    position. 

 ---------------------------------
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 ---------------------------------


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to