in reply to Re: Missing the if statement and going directly to else
in thread Missing the if statement and going directly to else

I have looked at your code, some of it I do not understand. I am in the process of learning the basics and I do not want to just copy someone else's code to solve my problem. I want to try and learn it myself. I know that there are easier and better ways to accomplish what I am trying to do. As I grow in the language I will be able to tweek it. The part numbers are in this format '68-2455-00' in the text file the part number is followed by several other fields all seperated by '|' When the part number is matched I want to print out the entire string that follows the part number in the text file. I did not see how to do this using the code you provided mainly because it uses some stuff that I have not learned about yet. I have only been learning Perl for about 1 1/2 weeks. That is why I am doing the hack job on it that i am doing. Also why I am spendiing several hours a day here learning. Kerry
  • Comment on Re: Re: Missing the if statement and going directly to else

Replies are listed 'Best First'.
Re^3: Missing the if statement and going directly to else
by Coruscate (Sexton) on Jan 17, 2003 at 07:47 UTC

    ...some of it I do not understand... I do not want to just copy someone else's code to solve my problem. I want to try and learn it myself... it uses some stuff that I have not learned about yet

    Kudos to you! You don't know how surprised I was to read this. Many people would have pretended to understand what the code (that I posted) was doing and copied it. I've seen many people (not on this site, but in other places in general) that take the easiest way out.

    As for actually solving your problem, I'll just ask one thing? Is it urgent that you get this program working? Do you have a strict deadline that you need to accomplish the task in? If not, I suggest that you take the time (though I see you said "why I am spending several hours a day here learning.", so I suppose that you're already doing so) to learn the language a little more before trying to do anything too complicated. Programming languages are like spoken/written languages: you don't go to France and expect to communicate with the local people after a week and a half of studying French :). The coolest thing with programming languages (the part that separates it from spoken/written languages) is that you can easily experiment with it. You can write a script and test it to see if it does what you were hoping on, but it's harder to call up a French person and trying to speak with them and seeing if they understand you. As well, if this program/script you need is being done for somebody else and you maybe have a deadline for it is to try and get more time to do it in. Your boss (assuming you have one) should be happy to oblige if they expect to get a quality program written. s/he is kidding him/herself if s/he expects someone to learn a whole new programming language in 2 weeks. Though I suppose some bosses are so incredibly impossible and greedy.

    One more thing I recommend to you: ask questions. You say you don't understand parts of the script I posted. Don't be afraid to ask me to clarify some portions of it. If you honestly don't understand the way in which any of it is setup, tell me. I can post it again with tons on comments to clarify things.

    Good luck to you!