Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I have been coding in Perl for about 7 years now. However, I am not a programmer, so I always thought I was pretty good.

Once I was actually employed to write Perl, and spent three months developing a replacement for Crystal Reports using GD::Graph and CGI. The package eventually went on to make the company a lot of money as part of a larger product, but I had already left by that stage, so didn't reap the rewards.

Prior to this year, I was employed as a DBA, and rather than writing SQL, I wrote everything using the most excellent DBI and DBD::Oracle. I left behind a lot of code for my replacement, and I heard the other day that he had rewritten eveything in ksh and deleted my work.

As some of you know, for the last few months I have been working on a programme to synchronize the various directory servers we have here - Active Directory with Exchange, Sun One Directory Server, Oracle Internet Directory and the payroll system - using, among other things: Net::LDAP. This is the project that led me to the Monastery 12 weeks ago today.
About two weeks ago, I finally finished phase one of this project and am now taking a much anticipated break from LDAP.

The first thing I was told was that few people would help me until I learnt to use strict;. I took this advice to heart, and indeed within a few days I wrote everything using strictures.
From there the whole world of lexical scope was opened to me.
Within one week of joining the Monastery I started using subroutines. I was pretty proud of myself. I looked over the code that I had written and realised that a lot of it was repetitous, so I created a package of my own for all the stuff that I kept using, and just called it with use lib '/path/to/new-package';.

The best package that I have learnt to use is Tie::File. This is my all time favourite. In the old days (ie about 4 weeks ago) in order to increment a sequence in a file, I used to do something like:

open (FILE, "<file.txt"); my @file=<FILE>; close FILE; my $file[0]=$file[0] + 1; open (FILE, ">file.txt"); print FILE "$file[0]\n"; close FILE;
Now, of course, I do the much better:

tie my @file, 'Tie::File', 'file.txt'; $file[0]=$file[0] + 1; untie @file;
As I look over my directory where the last three month's work sits, I see that there are 5000 lines in the production area and about another 10500 lines in my test area. For me, this is a lot of work. In three years at my last position I produced less than 1000 lines of code total.

Where should I go from here? Personally, I'd love to be able to understand the Schwartzian Transform, but I think I have a long way to go before that becomes clear.

My thanks to you all for helping me on my journey to Perl enlightenment.


In reply to Things I have learnt by neilh

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (5)
    As of 2018-06-23 00:49 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (124 votes). Check out past polls.