Greatbadaxe has asked for the wisdom of the Perl Monks concerning the following question:

I need to write a look up table of sorts. Basically I have file that I need to process with a filter that contains a "ownerid" that does not match a "real user" in our Active Directory. I have a way to process this file and run a perl script against it. My thought is to create a text file with 2 columns. First would be what the "ownerid" on the incoming job contains (originating program that passes this file contains a variable I can use for "ownerid" then match it to the actual AD account in the second column.. Just don't have a clue on how to do this. Been reading the sites and Perl book - Arrays? Hashes? Any thoughts would truly be helpful. Thanks in advance. -GB
  • Comment on Trying to learn but need help - thanks!

Replies are listed 'Best First'.
Re: Trying to learn but need help - thanks!
by roboticus (Chancellor) on Jul 14, 2014 at 20:31 UTC

    Greatbadaxe:

    I'd suggest using a hash to do the User ID to name lookup. Read the documentation (perldoc -q hash at the command line) to get interesting bits of code to help you use hashes.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      Thank you for your reply Roboticus. I will look through and see if I can make any sense of it! -GB
Re: Trying to learn but need help - thanks!
by pvaldes (Chaplain) on Jul 15, 2014 at 21:57 UTC

    Any thoughts would truly be helpful.

    I'm still trying to understand the question, please provide an small example with real code and data.

    What type of infile?

    What SO?

    How is your filter designed?