Perl Question on How to Design an Effective Script
Hello All,
This is my situation and I am new to perl scripting so I am trying to figure out the best way to tackle this problem. I need help in creating the logic to analyze the data.
Problem: I need to access an oracle database, gather information from a specific query and then analyze the query results. There are two pieces of information that are retrieved from the db, a number and a name. I need to analyze the number as well as the name. For the number it will have to be between 500 or 1000 to be acceptable. For the name I will have a static list and the query name will have to be on the list if it is not then an error will have to be outputted.
What I have done so far:
I am using the perl dbi/dbd module with oracle. I am able to access the db, run the query, and get the results from the db. I am gathering the information into an array ref. To print it out just to see the output I run a foreach.
Question: My issue is how can I put my conditional logic in? Is an array_ref the correct method? I am trying to grab the data, close the db connection and then process the data. Trying to keep any database connection activity to a minimum. Can I manipulate the array_ref similar to the way the foreach statement does?
https://www.unix.com/programming/252468-perl-script-create-football-formation.html https://www.unix.com/members/43551.html, it is not repeated question. please read it before u block my question. Unblock it for me. Thanks:mad: (0 Replies)
Hi. I'm having trouble writing a wrapper script for the command line text editor gnu ed.
I want to be able to run the following algorithm on ed:
1. Display, on stdout, a command which I intend to feed into ed (before I actually feed it to ed).
2. Actually feed the command into ed's stdin.... (2 Replies)
Hi,
I have a unix machine that hosts 5 oracle databases.
Each database has its own "ORACLE_HOME" with is actualy an oracle software .
Each software is installed in its own directory.
For example :
/u01/app/oracle/product/11.2.0/TERP11gR2
/u01/app/oracle/product/11.2.0/QERP11gR2... (0 Replies)
Hello ALL,
I have a file say test.txt, data in that file is in format such that
1st column represents number of executions of particular function
2nd column represents total amount of time
3rd column represents function name
I want to get the poor/slow performing function from this file.... (6 Replies)
AIX, Solaris, Linux Test Environment Design Question
We want to set an AIX, Solaris & Linux test environment. Here are the hardware equipments:
(1) A Sunfire v100 (or v120), 1GB memory, two 36GB HDD.
(2) An IBM pSeries 7026, 1 GB memory, 4 9GB HDD.
(3) Five external HDD with SCSI... (1 Reply)
AIX, Solaris, Linux Test Environment Design Question
We want to set an AIX, Solaris & Linux test environment. Here are the hardware equipments:
(1) A Sunfire v100 (or v120), 1GB memory, two 36GB HDD.
(2) An IBM pSeries 7026, 1 GB memory, 4 9GB HDD.
(3) Five external HDD with SCSI... (4 Replies)
Short Description:
To find the core files from a directory for the previous day and e-mail it across to a particular id.
1) Finding the core files in a directory.
2) The time is divided into eight fields and based on the time the respective field should be updated with the flag 1.
... (1 Reply)
LOGFILE
========
My name is: ?Anthony Perkins
I am an American citizen.
My name is: ?Donte Suarez
I am a Spanish citizen.
My name is: ? lenny Davis
I am an Australian citizen.
My name is: ?allen rigodeau
I am a French citizen.
My name is: ? manuel williams
I am a Mexican citizen.
... (2 Replies)