Perl newbie here. I have some working code I strung up together with help from others along the way. I am still quite unclear of how I should approach this problem with using an array of hash, hash refs. Right now it works using hashes, but I was also advised I can use an array for thise too. As...
I have the following shell script:
#!/bin/bash
find /db1/sgl/backup/ -name "*sgl*" -mtime +20 -print | cut -c21-28 | while read RECORD
do
echo "ls -ltr *$RECORD*" >> listfiles.sh
done
The output file would look like this:
ls -ltr *sgl_p814*
But there are instances where the filename has...
I am trying to capture output that I need, thus creating my own logfile after script execution. I am using the system() command to execute (2) programs.
The first one is calling another perl script, the second one is a simple printout of the environment, using 'env', but I want it to be...
I want to add and use a perl module called Finance::Quote using CPAN.
This is the first module that I had tried to add using CPAN.
I am doing this on my mac book pro that is running perl version 5.8 on mac osx (10.5.8, 2.4Ghz Intel Dual Core 2 Duo)
I am getting the following errors, try to...
So far I have this script running, but what I want to do is create a timestamped file, getting from date and then call it for example 20100319.cnf
I am having problems though trying to get the date part to append to the ".cnf" name.
I tried using "." to concatenate it. Apparently I don't...
Hi, I'm trying to call an Oracle database utility within a perl script. Initially, I created the perl script to check some background process on the server. Now, if certain processes exist, I want to launch this database utility. I need help in executing/launching within this script. So far my...
I'm trying to copy a table with sample records using this syntax: (mysql 4.1)
CREATE TABLE mytest.alert_reason_1 select * from urldb2.alert_reason_1 limit 10;
It works, but it creates the table as default MyISAM for all tables even if the table I copied from is an InnoDB table. I'm trying to...
Guys, I'm stuck trying to format my output using "print". I basically want to keep the string as one line, but it breaks off at the point where I'm calling the scalar variable.
Here is the sample output.
create table urldb3.Heartbeat
select * from urldb2.Heartbeat
limit 10;
Here is my...
Newbie here. I'm not sure if I'm supposed to use an array or not. I was able to run a system command that listed out table names in mysql (command line). For each table name given, I want to print out a statement. So far I can execute the system call, and it spits out the list, but that's it. I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.