Am Montag, 14. Oktober 2002 15:11 schrieben Sie: > .------[ 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 > ---------------------------------
THX 4 help but i figured it out 5mins ago the var is in the hash :) sure the problem was that after the ip 192.168.1.13 there was a tabstop my $nameserver2 = $vars{server}; $nameserver2 =~s/\t+//; this works fine now :D i got the problem cause of the sub which reads the config file ... have to fix this asap .... pike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]