Programming :: Write A Small Perl Script To Collect Some Info From Mysql?

Oct 10, 2010

am running Centos 5.4 and would like to write a small perl script to collect some info from mysql.

so I went
yum install perl-DBI
yum install perl-DBD-mysql

then

nano perl.pl
---
#!/bin/perl
use Mysql;

[Code].....

Why can't perl find Mysql.pm? I guess because it doesn't exist as I ran find / -name Mysql.pm, and also could not find it.

shouldn't that file have been created and thus exist after I install perl-DBD-mysql?

View 6 Replies


ADVERTISEMENT

General :: Write A Shell Script Which Will Simultaneously Collect OS User Information And Write In An Individual Text Files?

Feb 17, 2010

I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.

View 8 Replies View Related

Programming :: How To Write Small Project With C++

Dec 29, 2010

I am trying to write my first small project with C++ - implement stl list like collection class. This is what i have a the moment:

Code:

#ifndef GUARD_link_list_h
#define GUARD_link_list_h
template <class T>
struct Node {

[code]....

View 1 Replies View Related

Programming :: Write A Small Program That Shows Some Stockquotes And Indexes Etc On The Desktop?

Aug 29, 2010

I want to write a small program that shows some stockquotes and indexes etc on the desktop. Does anyone know how to get the quotes from google, yahoo etc? Do I rip it from the webpages or is there some other way?

View 3 Replies View Related

Programming :: Perl And Mysql - Warnings?

Dec 2, 2010

I've decided to learn perl and have an application that is going to require the use of mysql.

Are these warnings bad?

Here's the code:

Code:

And the warnings:

Code:

View 2 Replies View Related

Programming :: Write Iptables Commands In Perl?

Jul 14, 2010

I've worked with iptables in shell, but now I need to write an iptables command with perl. here is my code that I've tried but it didn't work :

Code:
#!/usr/bin/perl
print "Content-type: text/html

[code]...

View 4 Replies View Related

Programming :: Perl - Writing To File - Keep Open Or Only During Write?

May 24, 2011

i am working on this thread: [URL] if it is better to open a file every time i need to write to it or should i keep a file open the whole time and when i am done with the script, close it and sendmail it out?

Or i just thought of this: i could keep concatenating to a string and just sendmail when done.

View 2 Replies View Related

Programming :: Using Perl To Update Mysql Table On Certain Event?

Feb 6, 2011

I'd like to use a perl script to update a fields in mysql database when pianobar (command line pandora radio player) starts a new song. Pianobar has the ability to run a script based on events, I'd like to take advantage of and use perl toparse the artist,song,album and update the corresponding fields. Then later retrieve them and display them with php/html. I am by no means proficient with perl. I started to use bash, but it looks like perl will be much more efficient and and less time consuming.

Code:
#! /usr/bin/perl -wT
use strict;

[code]...

View 2 Replies View Related

Programming :: Perl: Compare CGI Input With Data From A MySQL Table?

Nov 19, 2008

I have this program:

#! /usr/bin/perl
use DBI ;
use strict ;

[code]....

and I get this error simply running the program from the command line: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 at ./submit.cgi line 24.

is this the right syntax to use, both, for this line:

my (@param) = $cgi->param("firstname","lastname","type") ;

as well as this one:

$sth=$dbh->prepare ("SELECT firstname,lastname,type FROM dts WHERE firstname LIKE $param[0] AND lastname LIKE $param[1] and type LIKE $param[2]" );

or should there be quotes around the $param[0] or something? (also is it $param[0] or $param(0)?)

View 1 Replies View Related

Programming :: Write A Perl Script Which Will Give An Interactive Session To A User To Execute Command On The Server

Feb 25, 2011

I am trying to write a perl script which will give an interactive session to a user to execute command on the server. I have written a small script to do this :

Code: !/usr/bin/perl -w
use strict;
use Net::SSH::Perl;
my $host = '192.168.1.1';
my $username = 'user';
my $login_passwd = 'test123';

[Code]...

View 2 Replies View Related

Programming :: Write A Program That Interacts With MySql In C

Mar 28, 2011

Im trying to write a program that interacts with MySql in C . Im using slackware 13.1 64 bit and Ive installed MySql , getting help from this page : [URL] .

This is the program I have ( I know they arent any vars here , i just thought it wasnt necessary )

Code:
#include <stdio.h>
#include <mysql/my_global.h>
#include <mysql/my_sys.h>
#include <mysql/mysql.h>

[Code]....

This program is from the MySql website ( a tutorial they have up there ). When I run this program I get hundreds of lines of errors , nothing related to my program , but the headers, indicating that there are syntax errors and all kinds of other problems in them.

View 8 Replies View Related

Software :: Having Small Project Of Php Script And Mysql Database - How To Configure In .deb File

Jul 25, 2011

make deb package with samll project of php and myysql database such as login.php, index.php controll.php etc and database_name.sql. when i install this deb package my php script folder should go in /var/www file and databse should create automatically. i edit the control file of deb package , in depends line i set apache2, php and mysql because these three thing are necessary to run my script till here it is ok .but i am not able to send my project in /var/www and configure database automatically . i think for this i have to write .sh file but i dont know bash scripting

View 1 Replies View Related

Red Hat :: Installing Perl (v5.8.8) Module For Connecting To MySQL

Aug 2, 2010

I want to connect to MySQL Database installed on RHEL 5 using perl v 5.8.8.The available DBD perl drivers installed on my machine are:DBM, ExampleP, File, Pg, Proxy, Sponge..I downloaded DBD-mysql-2.1012 and tried installing DBD again but got the following error:Can't exec "mysql_config": No such file or directory at Makefile.PL line 167.readline() on closed filehandle PIPE at Makefile.PL line 169.On searching I found that I need to install libz-devel prior to installing driver for MySQL for Perl.

View 1 Replies View Related

Slackware :: Get The DBI Drivers Installed For Perl And MySQL?

Feb 6, 2011

I have spent over half of the day, literally, trying to get my server to parse perl and be able to use perl scripts to interact with my SQL server. Has anyone been able to get it to work? Only looking for answers to Slackware. There are a lot of resources for FC and Ubuntu, but that does me no good. I checked the Slackbuilds for their builds, and built the libdbi and libdbi-drivers package, but still cannot get it to communicate.

View 1 Replies View Related

CentOS 5 :: Installing Additional Perl And Mysql?

Dec 9, 2009

I have a permission to use several CentOS5 computers that are connected to a server where all shared programs sit. Accordingly, all Perl users for example have an identical path to Perl (e.g. /export/user/bin). The administrator suggested I'll install all the programs I need (specifically Perl and Mysql) in my personal space, and then add them to the path before the already installed ones. Accordingly, I could add/change modules without "sudo" privileges, and without changing the global setting.

View 1 Replies View Related

General :: How To Write Perl Script To Catch All Content

Aug 5, 2010

I would like to know a how to write Perl script to catch all the content in between BEGIN: and END from input file could any body help?

View 9 Replies View Related

General :: Write A Perl Script To Ping Multiple Server?

Jul 22, 2011

How to write a perl script to ping multiple server and if any server is down then we manually bring up the server within 3hours wehn it goes down and will display a message" server is up within 3hours" and if we are unable to bring the server up manually within 3 hours then we will display a message " unable to bring the server alive". Need perl script to display the message.

View 1 Replies View Related

Ubuntu :: Restricted To Debian Versions Of Things Like Perl, MySQL?

Dec 13, 2010

As I mentioned on another thread, I have 2 Ubuntus - Jaunty and Meerkat - as separate drives on my secondary IDE channel. I am removing Jaunty. Meerkat blows it away. And is certainly my preferred OS. However I am looking for a replacement for Jaunty that is more flexible in certain key areas than Ubuntu appears to be.I dont want to be restricted to Debian versions of things like Perl, MySQL, PHP and others. I can run LAMPP, but I would prefer to compile and have the versions of my choice as part of a main test system (apart from Meerkat that is).

I have had enough nightmares in Jaunty with things getting broken and spiralling out of control. I want a distro that doesnt rely on the GUI and its attendant utilities, but can run them when called. Meerkat is stable and has resisted me breaking it so far, but I do not want to push my luck. I have too much time invested in it. I intend to use Meerkat as my primary system on the machine, but want an alternative to *PLAY* with.

View 9 Replies View Related

Server :: Perl Apache Session MySQL Inconsistency On Debian Lenny

Apr 11, 2011

I have been tearing my hair out with this. As part of a backend perl script i am holding the Epoch time as session data using apache session and mysql so i can delete sessions after an expiry period. When I retrieve the time it is about three months old even when i only just set it. The code example below best describes the problem:

View 5 Replies View Related

Software :: Getting Bugzilla Setup On RedHat - Perl Install-module.pl DBD - Mysql ?

Apr 12, 2010

I am having some issues getting Bugzilla setup, I have the software on the server and am trying to get the pre-rec's setup.

I am using RedHat 4.1.2-42.

I have all of the required perl modules save one:DBD::mysql

When I try:

I get the following response(this is only an excerpt):

Can't test without successful make Running make install make had returned bad status, install seems impossible.

View 14 Replies View Related

Programming :: Is There Small IDE For Lconsole?

Oct 4, 2010

i'm learning C now, later C++. using DJGPP isn't so nice on MS-DOS yet, no LFNs etc. and other limitations that is only one terminal, no multitasking etc.is there a small IDE for linux console? (i'm using a celeron 333 atm). for C it would be sufficient i guess?what i would need is a wide documentation, help on .h files, includes etc.on MS-DOS i use RHIDE. later on i might use eclipse or code::blocks. read another thread about c/c++ IDE.

View 14 Replies View Related

General :: Write A Simple Program C++ To Connect To Mysql Database?

Sep 5, 2010

I'm trying to write a simple program c++ to connect to Mysql database based in my 127.0.0.1 server:

int main (void) {
cout << "33[2J" << "33[0;0f";
MYSQL mysql;
MYSQL *conn;

[code]....

View 2 Replies View Related

Programming :: Socket Programming In Module Perl

Jul 21, 2010

Where is the perl module for programming with sockets?

View 4 Replies View Related

Programming :: Create A Small Array Of 3x3 Arrays?

Jul 12, 2009

I'm trying to figure how to create an small array of 3x3 arrays such I can do

Code:

SUM1(i) = SUM1(i) + SUM2

where i goes from 1 to 8 and SUM2 is a 3x3 array.

View 2 Replies View Related

Programming :: Small Projects In C++ Using Advanced Features

Feb 4, 2010

Can any one point out links to some small projects w.r.t C++ ? Now when I say small projects. It doesn't mean building a calculator or matrix multiplication programs, nor does it mean building games, nor does it mean dealing with databases,

What I actually want is to use the advanced features of C++ like:
i.Templates
ii. Nested friends
iii.Virtual functions
iv. Operator overloading (not merely '+', '-') but '[', '<<' also

View 4 Replies View Related

Programming :: Send File With FTP From Small Version?

Feb 9, 2011

I have this problem.I need to do this:I got a small version of Linux installed in some small devices. These devices come from the provider with this small version of Linux installed.This devices should send data to some other machine in the internet. I have tested wput for this purpose with a PC which has an Ubuntu version 10 and it works fine. However, when I try wput in the small device, I get an error. It seems that the wput might need some libraries to work with the small version of Linux installed in the small device.The fact of using wput or not is optional. I just need being able to send files through ftp with this small version of Linux.The thing is that to be able to run wput in this small version of Linux, it seems that many of the needed libraries were missing. So what I did was just install all the needed libraries. But still the wput program fails in its first line.

View 14 Replies View Related

Programming :: Small Awk Script: Critiques Sought?

Mar 18, 2010

I'm not fluent in awk and would like to improve so seek critiques of this effort: stylistic, functional, whatever ...

Code:
#!/usr/bin/awk -f
BEGIN {
FS = "="
tab = " "

[Code]...

View 23 Replies View Related

Programming :: Proofread Prompt / Small Error Can't Find?

Jun 1, 2011

I've set the following as my prompt:... can't post the string due to the 15 post rule. how helpful....

Everything looks fine initially.
1- It sets the username and host in back on green text.
2- It then changes to an off-white an prints the command number for the terminal.
3- Next, it prints the working directory.
4- Finally is prints a ">" character and a space. it looks like this (hostname/un edited & image enlarged slightly to make it easier to read.)

The problem occurs when I try to "up arrow" to reuse and/or edit a prior command. It prints the prior command fine, but if I arrow over to edit the command sometimes the first character can not be deleted from displaying

I'd love to post 2 screen-shots I took to show the problem but.. 15 posts?

View 1 Replies View Related

General :: Set Up And Administer A Small Programming Desktop Environment?

Feb 23, 2011

I am would like to learn how to keep my system clean of unneeded and unwanted file clutter as I am trying to get the most out of my older home built pc. I am running fatdog64 puppy linux off of a usb stick right now, but I would like to have a small standards based setup on my hard drive to use as a base to build a custom kernel for my pc. I sure miss my old GEM desktop

View 1 Replies View Related

Programming :: Gimp Commands To Edit Small Image?

Jul 20, 2010

I have a few small still images of around 300 bytes each that I created under Windows many years ago, I'd like to:

1) change the colour of some pixels on each and
2) make them the exact same size but I do not want to learn Gimp to do this since I have no other use for it.

Could someone show me the sequences of commands in Gimp GUI that will do the job?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved