in reply to use a variable in ldapsearch filter

Are you aware that single-quoted strings do not interpolate?

c:\@Work\Perl\monks>perl -wMstrict -le "my $name = 'foobleooble'; print '(sn = $name)'; " (sn = $name)


Give a man a fish:  <%-{-{-{-<