[Brisbane-pm] Help - I barely speak Camel.

Sarah Smith Sarah.Smith at trolltech.com
Thu Jul 27 23:53:01 PDT 2006


Peter Machell wrote:
> Hi list. Jacinta Richardson suggested I join. I'm a fairly junior  
> sysadmin, by no means a programmer. I have hacked bits and pieces in  
> Perl over the years and find it very good for glue, but do this so  
> infrequently that I need to relearn even the basics each time.
>
> I need to develop a simple application and would like to do so in  
> Perl. Is this list an appropriate place to ask questions about this  
> with a view to better understanding and refining my code?
>
> Assuming that it is, can I start with the workflow and see if it  
> makes sense?
>
> I need to interface with a number of different databases to pull out  
> some demographic information, feed this into an array, regex it to  
> get the formatting right, then send it, and a message containing  
> variables from this info, to an API for which I have a Perl example.  
> Returning from that API will be some debug, which I'd like to combine  
> with the information and print out to a HTML file for reporting.
>   

Perls CGI module will do what you need and has a great man page.  Try 
"man CGI" on your Apple OSX machine.

> As I'm dealing with a number of different database engines, I figure  
> I'll do the initial data mining using those engine's tools, and start  
> the Perl code with pulling data from a CSV file. This seems easier to  
> me than trying to get a DBI going for each engine and using Perl to  
> do the queries.
>   
Sure.  For one off reports that's probably fine.
> I'm sure there are many on this list that could knock this up in a  
> few minutes, but I'd really like to do it myself so that I can  
> completely understand the process, and continue to develop and  
> support it.
>   
I think if you're treating this partly as a learning experience then 
doing the DBI code would probably be a good thing.

Also if you have to run the script more than once its going to be more a 
complete solution if it can be run directly from the databases without 
having to go thru some intermediate manual steps first.

When doing DBI coding I usually use the console based tools for the 
database to make sure my SQL is working and then code it up in Perl.  So 
you'll need to go thru that step first anyway.

Also you talk about feeding the data into an array - you might find that 
methods like fetchrow_hashref will do a lot of the work you're thinking 
of doing for you.
> Please let me know if this is an appropriate forum for this sort of  
> thing, and if not, where I may find one.
>   
I'm sure folks on this list will help where time permits.


> Thanks in advance,
>
> Peter.
> _______________________________________________
> Brisbane-pm mailing list
> Brisbane-pm at pm.org
> http://mail.pm.org/mailman/listinfo/brisbane-pm
>
>   



More information about the Brisbane-pm mailing list