in reply to Re: Building XML with tab delimited
in thread Building XML with tab delimited

Wow Ken! Thank you so much. This solution works. I have been programming in Perl in no more than 10 days....so there are lot of unknowns for me. This has been a great resource. Thanks again!

Replies are listed 'Best First'.
Re^3: Building XML with tab delimited
by kcott (Archbishop) on Aug 11, 2016 at 21:25 UTC
    "Wow Ken! Thank you so much. This solution works."

    You're welcome.

    "I have been programming in Perl in no more than 10 days....so there are lot of unknowns for me. This has been a great resource."

    While I did see your "I am relative new to Perl.", I wasn't aware just how new. Not a bad effort at all for a total beginner. Here's some additional resources (in no particular order).

    • If you haven't already done so, I recommend you bookmark "http://perldoc.perl.org/perl.html". This has links to tutorials, FAQs and documentation. [Hint: If you just want to look up a function, the "Perl functions A-Z" index (that's the "Functions" link in the sidebar) is much faster, and easier to navigate, than the perlfunc page, which is very large and can take substantially longer to load.]
    • Prefer lexical filehandles and the 3-argument form of open. The filehandles you've used are package variables, with global scope: in larger programs, where you've perhaps unwittingly used something with a non-specific name (like FILEWRITE) in more than one place, you can easily introduce hard-to-track-down bugs. Furthermore, when a lexical filehandle goes out of scope, Perl will automatically close it for you: one more thing you don't have to worry about and a potential point of error removed.
    • I/O, and other operations, should be checked for failure. This can be tedious and error-prone: let Perl handle this for you with the autodie pragma.
    • Use lexical variables in the smallest scope possible. See "perlsub: Private Variables via my()" for more on this.

    You can find examples (of all of the code-related points above) in my posted solution.

    — Ken

      Thank you Ken for words of encouragement and tips. Greatly appreciate it. I will surly check all the links. I am trying to get my hands on everything about perl and your tips will go long way.

Re^3: Building XML with tab delimited
by robby_dobby (Hermit) on Aug 11, 2016 at 15:48 UTC
    Hey sannag,

    Aah, I didn't realize you were totally new to perl and I went ahead suggesting that you use references! Anyway, welcome to the monastery and have fun!

      This has been my first time using perl monks.....I truly want to thank everyone for there wisdom