Re: Database entries into a hash or array

2006-11-15 Thread Mathew Snyder
Ah-hah, of course! Thanks. Mathew John W. Krahn wrote: > Mathew Snyder wrote: >> Figured it out. >> >> New question though. Here's my code: >> >> #!/usr/bin/perl >> use DBI; >> use strict; >> >> my $dbh = DBI->connect ( "dbi:mysql:dbname=rt3_devel;host=10.0.2.27", >> "svr", "") or die "

Re: Database entries into a hash or array

2006-11-15 Thread John W. Krahn
Mathew Snyder wrote: > Figured it out. > > New question though. Here's my code: > > #!/usr/bin/perl > use DBI; > use strict; > > my $dbh = DBI->connect ( "dbi:mysql:dbname=rt3_devel;host=10.0.2.27", > "svr", "") or die "Cannot connect to database!\n"; > > my $sth = $dbh->prepare("SELEC

Re: Database entries into a hash or array

2006-11-15 Thread Mathew Snyder
Figured it out. New question though. Here's my code: #!/usr/bin/perl use DBI; use strict; my $dbh = DBI->connect ( "dbi:mysql:dbname=rt3_devel;host=10.0.2.27", "svr", "") or die "Cannot connect to database!\n"; my $sth = $dbh->prepare("SELECT DISTINCT Content FROM ObjectCustomFieldValu

Re: Need help in installing perl modules

2006-11-15 Thread Omega -1911
If it will not install using those methods and time is of the essence,just manually download the .pm files and place them in the apropriate folder (inside your perl folder i.g. C:\Perl\lib) On 11/16/06, Anushya Ganapathy <[EMAIL PROTECTED]> wrote: Hi, I am in the very critical situation while

Need help in installing perl modules

2006-11-15 Thread Anushya Ganapathy
Hi, I am in the very critical situation while installing the perl modules in WINDOWS. If i tried to install the perl modules by extracting the tar file and running the make file, it is giving the command line error. If i tried to install the perl modules using the command 'perl -MCPAN -e install

Database entries into a hash or array

2006-11-15 Thread Mathew Snyder
I need to pull all the entries for a column from a database. I'm using DBI and the database is MySQL. How I do pull the data I need and place it into a hash or an array? I can build the $sth but haven't a clue how to extrapolate the data after the query runs. Mathew -- To unsubscribe, e-mail:

Re: install libs under private directory

2006-11-15 Thread John W. Krahn
Jm lists wrote: > hello members, Hello, > I want to install some perl libs under my home dir since I don't have the > root privileges. > Can you tell me how to do it other than the method of "perl -MCPAN -e > shell"?Thanks. perldoc -q "How do I keep my own module/library directory" John -- Pe

install libs under private directory

2006-11-15 Thread Jm lists
hello members, I want to install some perl libs under my home dir since I don't have the root privileges. Can you tell me how to do it other than the method of "perl -MCPAN -e shell"?Thanks.

Re: How to manipulate environment variables in parent process?

2006-11-15 Thread Jay Savage
On 11/12/06, siegfried <[EMAIL PROTECTED]> wrote: Is it possible to write a perl script to manipulate the environment variables in a windows CMD.EXE shell? Normally, you can manipulate environment variables, but they only have effect for sub processes. I need to change the values of environmen

Re: Time format

2006-11-15 Thread John W. Krahn
Jm lists wrote: > Hi members, Hello, > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. use POSIX 'strftime'; my $date = strftime '%m.%d.%y %I:%M %p', localtime; John -- Perl isn't a tool

Re: Time format

2006-11-15 Thread Rob Dixon
Jm lists wrote: Hi members, I want to get this format of time: 11.07.06 12:00 pm can you tell me how to get it?(maybe need to be translated from the 'localtime') Thanks. Is that 11 July or 7 November? Swap the day and month around in the output format in the program below if you wanted the l

Re: RE: How to manipulate environment variables in parent process?

2006-11-15 Thread Tom Phoenix
On 11/14/06, siegfried <[EMAIL PROTECTED]> wrote: Yeah: that is precisely the problem. The child inherits from the parent. Can I make the child manipulate the environment table in the parent? I don't think so. Please tell me I'm wrong. No program wants its data changed without its knowledge an

Re: Time format

2006-11-15 Thread Jm lists
Very cool!Thanks. 2006/11/15, Ricardo SIGNES <[EMAIL PROTECTED]>: * Jm lists <[EMAIL PROTECTED]> [2006-11-15T09:57:44] > Hi members, > > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. Consu

Re: Time format

2006-11-15 Thread Ricardo SIGNES
* Jm lists <[EMAIL PROTECTED]> [2006-11-15T09:57:44] > Hi members, > > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. Consult "perldoc -f localtime": #012 3 45

Time format

2006-11-15 Thread Jm lists
Hi members, I want to get this format of time: 11.07.06 12:00 pm can you tell me how to get it?(maybe need to be translated from the 'localtime') Thanks.

Need help in installing perl modules

2006-11-15 Thread Anushya Ganapathy
Hi, I am in the very critical situation while installing the perl modules in WINDOWS. If i tried to install the perl modules by extracting the tar file and running the make file, it is giving the command line error. If i tried to install the perl modules using the command 'perl -MCPAN -e install

Re: log file help

2006-11-15 Thread Chris Parker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mumia W. wrote: > On 11/14/2006 09:53 PM, Chris Parker wrote: >> >> I couldn't find the answer while googling for a regexp to pull the ip >> from my log files so here I am. I am trying to get the ip's (source and >> destination) along with the ports f

Re: log file help

2006-11-15 Thread Mumia W.
On 11/14/2006 09:53 PM, Chris Parker wrote: I couldn't find the answer while googling for a regexp to pull the ip from my log files so here I am. I am trying to get the ip's (source and destination) along with the ports for a summary. WFLOG doesnt cover my firewall so I thought id try. Code i

Re: Name of current sub

2006-11-15 Thread Mumia W.
On 11/15/2006 03:06 AM, Nigel Peck wrote: Is there a way to get the name of the current sub? So: sub test_sub { $subname = ???; print $subname; # prints test_sub? } Took a look through Programming Perl and Googled it but couldn't find the answer. TIA Nigel $subname = (caller 0)[

Re: Name of current sub

2006-11-15 Thread Nigel Peck
I wrote: Is there a way to get the name of the current sub? So: sub test_sub { $subname = ???; print $subname; # prints test_sub? } Sorry, just found it: http://www.unix.org.ua/orelly/perl/cookbook/ch10_05.htm sub test_sub { $subname = (caller(0))[3]; print $subname; # prin

Name of current sub

2006-11-15 Thread Nigel Peck
Is there a way to get the name of the current sub? So: sub test_sub { $subname = ???; print $subname; # prints test_sub? } Took a look through Programming Perl and Googled it but couldn't find the answer. TIA Nigel -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional