in reply to Showing Sample Source Code without Modules

How would my fellow monks handle this situation? Unless you've written a module as example work, how do you show your Perl programming skills without relying on external modules, but still have an application that's around 100 lines in length?

Take an hour or two, write a little 100 line app. Document it, make it pretty and elegant, submit it to the interviewer.

Where's the problem?

  • Comment on Re: Showing Sample Source Code without Modules

Replies are listed 'Best First'.
Re^2: Showing Sample Source Code without Modules
by Belgarion (Chaplain) on Dec 02, 2005 at 22:04 UTC

    Well, in this case I had to send the sample immediately after the conclusion of the interview. Basically, I had to have something already prepared. I admit I should have had "sample" code ready, but as I said this was my first Perl specific interview. Inexperience in this matter caused me to be caught off guard. Hence my desire to seek opinions from those more experienced in these situations. Thank you for your help.

      Your case reminded me of my personal case, when I was new to Perl programming. I never used to use any external modules in my code. Just because I was Not aware of CPAN and I wanted to develop everything myself (I realized later that it is Not a practical thing to do, you enjoy but your Boss suffers because of delay of submitting assignment).
      If you don't use any module then the code automatically becomes lengthy, it would surely cross 100 lines. To give you a suggestion, please write a code to convert a text file from one format to other format (e.g. one XML dtd to other XML dtd). This assignment would involves pure regular expressions and would Not need any external module
      I have written RTF to text converter without using any external modules, it is 1147 loc, I took lot of time to understand RTF format and develope the code (After writing the code I came to know that there is something similar available in CPAN :-))
        please write a code to convert a text file from one format to other format (e.g. one XML dtd to other XML dtd). This assignment would involves pure regular expressions and would Not need any external module

        The Perl5 regular expression engine (by itself) isn't up to XML, because of the way nesting is allowed in XML. Perl6 rules could handle it, but in any case an XML parser is a textbook example of something you should definitely NOT be reinventing without a full review of the existing ones and a really solid set of reasons why they won't do. (Unless of course you're doing it for the purpose of learning how or just for fun, in which case, go nuts.)