I haven't used perl much in the last 5 or so years. I prefer 'modern' languages like ruby but some ETL tasks have come up on our project that are way beyond what can nicely be handled with SSIS. Rather than having to use SQL as a text parsing language, we have decided to use perl.
An example of the type of problem we are facing is this: We get a file where the first character determines the format of the rest of the file. To get a complete transaction, you need to process 3 lines. For example we have (this is for a telco system):
Where [TAB] means a tab character.
So we get the account number and customer name on line 1, calling number on line 2, the called number, call type, duration and cost on line 3. There is a 1-N relationship from 1 to 2 and 2 to 3.
so rather than write the most complicated cursor ever we are using perl. The thing is i'm a bit rusty.
I'm interested to know:
a) What are some good books for re-learning perl (as opposed from starting from scratch)
b) Do you agree with the approach ? how would you tackle this problem ?