Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^4: Help please, or Urgent help needed!

by anakin30 (Acolyte)
on Mar 28, 2012 at 02:51 UTC ( #962056=note: print w/replies, xml ) Need Help??

in reply to Re^3: Help please, or Urgent help needed!
in thread Help please, or Urgent help needed!

I wish to print output as below, can you please explain more detail how i can get this output?" meanwhile i appreciate if you could tell me what do you mean by print "as you like"?

I'm still beginner in perl scripting, couldn't get it. I'm sorry. Please explain further.

dn: uid=testing,ou=comp, mail: dn: uid=testing1,ou=comp, mail: dn: uid=testing2,ou=comp, mail:

Replies are listed 'Best First'.
Re^5: Help please, or Urgent help needed!
by remiah (Hermit) on Mar 28, 2012 at 03:10 UTC

    Once you get "block" successfully, you can pick your needed item with regex or split.

    You can split with newline character, /\n/.

    perlretut is very important regex introduction for me. I would like you also read it.

    And you will be recommended to search cpan with keyword like LDIF. good luck.

      thank you so much for sharing the info, but i'm kind a urgent to get my desired output, and i dont have time at the moment to study and try the regex myself. I'm sure you can do it in a glimpse since you already knew about it. I appreciate you can help me in here to give me the source code to achieve the desired output. Please remiah....

        You have been given all of the tools to accomplish the task. split, $/, m. What you do with that information is entirely up to you.

        Imagine if I were to go into the local hardware store with pieces from my sink that I have tried to 'fix'. The employee there gives me instruction on what to use to remedy my fixes, points me to the various parts and tools I would need, and perhaps even points out a book that explains the process I need to complete my project. Is it proper that I should expect that employee to come to my house and fix it for me? Now imagine if I was being paid to do this by someone else, and I claim that I fixed it myself. Is that not similar to your situation?

        You can take the advice, learn how to do it, and implement it yourself (and take away a better set of personal skills), or pay someone else to do it. That is assuming, of course, that somebody does not "come to your place of business and fix your sink for free".


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962056]
[marto]: a security event in the building, police dogs and and so on...
[Discipulus]: a test I hope..
[marto]: just a security event, they have people from the 'corporate' security, external security companies, the police etc

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-11-22 10:25 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (317 votes). Check out past polls.