From: Jim H. <ha...@us...> - 2000-07-11 20:51:02
|
Net::LDAP will deal correctly with passing "100" or 100, since strings are sent to the server anyway. --Jim Harle US Naval Academy On Tue, 11 Jul 2000, Economou, Matthew (GEAE, Cardinal Solutions) wrote: > Hello, > > I have a Perl script that takes a DN, attribute, and values to replace on the > command line and executes the Net::LDAP::modify method with the specified > arguments, e.g. (with error checking, binding, etc., elided): > > $modifydn = shift; > $attribute = shift; > foreach $arg (@ARGV) { push @values, $arg; } > $result = $ldap -> modify (dn => $modifydn, replace => { $attribute => [ @values > ] }); > > All in all, it's fairly simple (the only big hang up I had was figuring out that > the "@values" part required square braces). My question regards type converting > the @values list. If the attribute that is being added/replaced is an integer > instead of a string, do I need to walk POSIX::strtol over @values, or will LDAP > or the module Do The Right Thing? > > Kind regards, > #\Matthew > > > |