V
V?ktu Pons i Colomer
Hi all, I've searching for a solution for that but no luck, so I'm in
the need of asking
I've this piece of code:
elsif ($operacio eq 'AfegirUid'){
tie %hash, 'Net::NIS','passwd','domain.com' or die "Can't tie
passwd: $yperr\n";
warn "---$memberUid---","\n";
my $valor = $hash{$memberUid};
if (defined($valor)) {
$memberUid is passed as a cgi parameter with:
my $memberUid=$q->param(memberUid);
The problem is that this code is broken with this error:
---francescf---
Unable to find 'francescf' in passwd.byname. Reason: args to yp
function are bad at /dev/fd/5 line 174
As you may have noticed, the value for $memberUid is francescf
But if I do that:
elsif ($operacio eq 'AfegirUid'){
tie %hash, 'Net::NIS','passwd','domain.com' or die "Can't tie
passwd: $yperr\n";
$memberUid="francescf";
warn "---$memberUid---","\n";
my $valor = $hash{$memberUid};
if (defined($valor)) {
it prints the same in the log, ---francescf---, but it works and give
no error!!!
Can't see the diference between the two codes, because $memberUid is
well filled with the parameter...
Any help will be appreciated! Thanks a lot in advance!
the need of asking
I've this piece of code:
elsif ($operacio eq 'AfegirUid'){
tie %hash, 'Net::NIS','passwd','domain.com' or die "Can't tie
passwd: $yperr\n";
warn "---$memberUid---","\n";
my $valor = $hash{$memberUid};
if (defined($valor)) {
$memberUid is passed as a cgi parameter with:
my $memberUid=$q->param(memberUid);
The problem is that this code is broken with this error:
---francescf---
Unable to find 'francescf' in passwd.byname. Reason: args to yp
function are bad at /dev/fd/5 line 174
As you may have noticed, the value for $memberUid is francescf
But if I do that:
elsif ($operacio eq 'AfegirUid'){
tie %hash, 'Net::NIS','passwd','domain.com' or die "Can't tie
passwd: $yperr\n";
$memberUid="francescf";
warn "---$memberUid---","\n";
my $valor = $hash{$memberUid};
if (defined($valor)) {
it prints the same in the log, ---francescf---, but it works and give
no error!!!
Can't see the diference between the two codes, because $memberUid is
well filled with the parameter...
Any help will be appreciated! Thanks a lot in advance!