Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://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.

Neil


In reply to Things I have learnt by neilh

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-28 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found