There's more than one way to do things | |
PerlMonks |
use a variable in ldapsearch filterby Cornichon (Initiate) |
on Mar 27, 2020 at 23:50 UTC ( [id://11114743]=perlquestion: print w/replies, xml ) | Need Help?? |
Cornichon has asked for the wisdom of the Perl Monks concerning the following question: Hello everyone, I'm writing a script that receives as a parameter the name of a user and performs a search in LDAP but I can't find a way to use a Perl variable in the LDAP search filter. The code used for the search is this one:
Let's say the variable $name contains the name I need to do the search. I tried this: filter => '(sn = $name)'. It's not working, does anyone have a solution for me?
Back to
Seekers of Perl Wisdom
|
|