Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^7: looping logic error while printing output from folder/flie content

by Vijay81 (Acolyte)
on Dec 19, 2012 at 14:11 UTC ( #1009566=note: print w/ replies, xml ) Need Help??


in reply to Re^6: looping logic error while printing output from folder/flie content
in thread looping logic error while printing output from folder/flie content

Thanks Graff. If am not asking too much. Can you please explain your script in details like what does each line do. so that after i understood correctly i can make the necessary changes

Just add the comment on the side of each line. that will do for me please

Many Thanks..


Comment on Re^7: looping logic error while printing output from folder/flie content
Re^8: looping logic error while printing output from folder/flie content
by marto (Chancellor) on Dec 19, 2012 at 14:20 UTC

    Seriously? What's stopping you making the effort of learning what each line does, and adding comments yourself? Your post history looks like you're asking for people here to deliver something you're being paid to deliver.

      Thanks for your comment marto. Well if i could have understand Graff script at first. I wouldn't be continuing to write comments. Secondly am still very new to perl. so i asked him to put a breif comments so that it will help to understand what it does.

      If you can't answer then please don't comment what ever you think, have a bit of sense or think before what you say. I agree you might be a great perl monk that's doesn't mean every one will be on your level. If you can't explain that's fine with me but don't ever write/think comment what comes to your mind. It my kind advice

      THINK AND ACT!!!!!!!!!!!!!!!!!!!!

        "THINK AND ACT!!!!!!!!!!!!!!!!!!!!"

        "have a bit of sense or think before what you say."

        It's a shame you can't take your own advice.

        "Well if i could have understand Graff script at first. I wouldn't be continuing to write comments."

        If you don't understand something the first time you look at something you just give up and ask someone else to do your job?

        "Secondly am still very new to perl. so i asked him to put a breif comments so that it will help to understand what it does."

        Someone gave you a script to solve your problem. If you don't understand what it does why don't you actually spend time and effort into learning what it does. This is often a good way to learn something. Asking someone to comment each line explaining what it does should be left as an exercise to the reader IMHO. Again you seem like your asking others to do your work for you. Your post history would seem to agree with this. From What is PerlMonks?:

        PerlMonks is:

        • An attempt to make learning Perl as non-intimidating and easy to use as possible.
        • A place for individuals to polish, improve, and showcase their Perl skills.
        • A community which allows everyone to grow and learn from each other.

        Asking someone to document the script they've given you seems lazy and doesn't fit into the criteria above. Perhaps you'd care to explain how you tried to understand the code you were given? I think you'd benefit from reading and understanding What is PerlMonks?, PerlMonks for the Absolute Beginner and some of the other posts linked to in Getting Started with PerlMonks.

        You're either being paid to do this task or it's home/course work. So consider taking the time to actually examine each line, check the check the Perl documentation and work out what it does via experimentation. I already informed you of resources for learning Perl.

        "If you can't explain that's fine with me but don't ever write/think comment what comes to your mind.

        What makes you think you're in a position to tell others what to do and what not to do?

        "It my kind advice"

        Thanks. Your exclamation mark key seems to stick, consider investing in a new keyboard.

Re^8: looping logic error while printing output from folder/flie content
by graff (Chancellor) on Dec 21, 2012 at 02:55 UTC
    WIth all due respect, marto's response was reasonable and appropriate. I considered adding more comments to the code I posted above, but then I realized that I don't know enough about your level of knowledge to determine what I should add to be most helpful to you.

    I also reflected on my own experience learning perl as a new language (way back in 1995). Someone handed me a bunch of perl scripts that were supposed to work together as a pipeline to do some really intricate text processing, and I was supposed to adapt it to handle a larger range of input data. I spent at least half of my time referring back to "perldoc -f ..." to look up the detailed (and quite clear) descriptions of perl functions (in fact, I often ran "perldoc perlfunc" to see them all), as well as "perldoc perlsyn", "perldoc perlre" and so on.

    That, along with stepping through in the debugger in order to see what a given function returned for a given input, allowed me to get my task done reasonably well. I highly recommend that approach. (Bear in mind that the code I posted might not do things the way you want them to be done.)

    And now that we have Data::Dumper, using the debugger is even better - just add  use Data::Dumper 'Dumper'; at the top, and as you step through you can just do  p Dumper($some_ref) or  p Dumper(\@some_array) and so on, to see what's happening.

Re^8: looping logic error while printing output from folder/flie content
by Vijay81 (Acolyte) on Dec 21, 2012 at 09:00 UTC

    I agree with you both. Graff and Marto.

    @Marto, please accept my sincere apologize for been rude. It wasn't intentional it's just came out as frastration. I hope you will understand.

    As pointed out, I will come back with comments on Graff script (what ever I understood) and if you think/forgive then please do help me to understand if am missedout or misunderstood the logic

    Once again, I am really sorry and apologize, feel very ashamed of myself

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-07-26 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (178 votes), past polls