Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: NET::LDAP and objectGUID

by ksublondie (Friar)
on Jan 24, 2017 at 16:56 UTC ( [id://1180223]=note: print w/replies, xml ) Need Help??


in reply to NET::LDAP and objectGUID

No responses, but I found a solution. I still don't know why I can't turn around and use the same retrieved data for the filter criteria 100% of the time, but using information from the following:

GUIDs and SIDs

Net::LDAP GUID...

I can now search by the objectGUID 100% of the time in my tests.

sub GuidToString { my $stringGUID = unpack("H*", shift); $stringGUID =~ s/^(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w) +(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)/\\$1\\$2\\$3\\$4\\$5 +\\$6\\$7\\$8\\$9\\$10\\$11\\$12\\$13\\$14\\$15\\$16/; return $stringGUID; }

Replies are listed 'Best First'.
Re^2: NET::LDAP and objectGUID
by haukex (Archbishop) on Jan 25, 2017 at 15:25 UTC

    Hi ksublondie,

    I don't know anything about LDAP GUIDs, but I just wanted to suggest a way to shorten that code. Note that unlike the regex, this works for input strings of any length.

    sub GuidToString { return join '', map {"\\$_"} unpack "(H2)*", shift; }

    Regards,
    -- Hauke D

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found