Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
sundialsvc4, thank you very much for your review. I don't take anything you said personally at all. I am always happy to get critique on my work, good or bad. In regards to your comments... I am not on a development team or producing enterprise level code in any way. Most of my scripts are used locally by my team in a very specific one-off scenario. In this case, we were using it to read the output of a tshark command that was always formatted the same way. Had this been something to use repeatedly, there would have been differences... among them fully commented code, sensible variable names (like $currentLine instead of $cl), etc. That said, I am also not a professional programmer, CS guy, or Perl expert - hence the original post looking for help. Coming into this script, I knew mostly *what* I wanted to do... but the *how* of moving around in a text file back and forth was new to me. So I Googled, read O'Reilly materials, and experimented until I got something that worked. What you don't see here is the 20 lines of "DEBUG: print..." I took back out! (( grin )) I would be very interested in how a programmer and Perl expert would tackle this. Could I ask you, if you have time, to re-do the algorithm in a "good" way? It would be purely for education... By the way, I think you're awesome for taking the time to look at my code and provide feedback!! Cheers!! ImJustAFriend In reply to Re^2: Previous Line Matching Issues
by ImJustAFriend
|
|