Dealing with Uninitialized values in an array and DBI?

2005-09-30 Thread Crayola
I am querying a table within an oracle database and extracting a ton of rows using DBI. Unfortunately.. several of the columns in this table will occasionally be undefined. Hence the resulting array from a fetchrow_array occasionally has undefined values in it. I am taking this array and pumping

Re: Comparing an array with hash keys

2005-09-30 Thread Peter Rabbitson
> ... or grep > > my @storage_array = grep { exists $original_hash{$_} } @original_array; > Disregard that, didn't read the question/answer well enough. Bummer... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Comparing an array with hash keys

2005-09-30 Thread Peter Rabbitson
On Fri, Sep 30, 2005 at 10:08:51AM -0400, Jeff 'japhy' Pinyan wrote: > On Sep 30, Mark Martin said: > > >I want to compare the elements of an array with the keys in a hash. If > >matches are found, I want to store the values associated with the > >matched keys in an array for future processing :

Re: Using the module HTTP::Request

2005-09-30 Thread Bob Showalter
Ranish wrote: But the output of the code is perl aprequest.pl HTTP::Response=HASH(0x81e8a84) How can I make this human readable. print $response->as_string; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Using the module HTTP::Request

2005-09-30 Thread Ranish
Hello All, I am trying to use the module HTTP::Request. I tried to use the code given in perldoc HTTP::Request Here is my code == #!/usr/bin/perl -w use strict; require HTTP::Request; require LWP::UserAgent; my ($request,$response,$ua); $ua = LWP::UserAgent->new; $request

RE: a little help...

2005-09-30 Thread Wagner, David --- Senior Programmer Analyst --- WGO
FamiLink Admin wrote: > Thanks for all the help! I'm almost there... > > Should: > > foreach $MyIpAddr (sort keys %{MyIpAddrInfo}) { > next if ( $MyIpAddrInfo->{MyIpAddr} <= $blocklimit ); # if > less than or equal get next key > print $output2 "$ip/32\n"; > > be: > >

Re: readdir question

2005-09-30 Thread Jay Savage
On 9/30/05, Gergely Buday <[EMAIL PROTECTED]> wrote: > Hi, > > this is a working code snippet: > > opendir (DIR, $dir) || die "Open failed: $!\n"; > > $\ = "\n"; > while ($_ = readdir(DIR)) { print; }; > > But when I try to use > > while (readdir(DIR)) ... > > my script writes only empty lines. It

Re: question about # of files in a directory

2005-09-30 Thread Jeff 'japhy' Pinyan
On Sep 28, ZHAO, BING said: Is there a way to call or maybe get the # of files in a directory? The simplest way is to use opendir() and readdir(). opendir my($dh), $path or die "can't opendir $path: $!"; my @files = readdir $dh; closedir $dh; Now you have the files from the

Re: Comparing an array with hash keys

2005-09-30 Thread Jeff 'japhy' Pinyan
On Sep 30, Mark Martin said: I want to compare the elements of an array with the keys in a hash. If matches are found, I want to store the values associated with the matched keys in an array for future processing : my @storage_array = (); foreach $item(@original array) { if (exists $

Comparing an array with hash keys

2005-09-30 Thread Mark Martin
Hi, I want to compare the elements of an array with the keys in a hash. If matches are found, I want to store the values associated with the matched keys in an array for future processing : my @storage_array = (); foreach $item(@original array) {

Re: generating a wordlist from an array of arrays

2005-09-30 Thread John W. Krahn
Adriano Ferreira wrote: > On 9/29/05, mark berger <[EMAIL PROTECTED]> wrote: >>hey list. i stuck with gererating a wordlist from a changing >>multidimensional array. each entry in the array contains a list with the >>possible values. > > I am bit rusty, because it took me a little too long to make

Re: generating a wordlist from an array of arrays

2005-09-30 Thread Adriano Ferreira
On 9/29/05, mark berger <[EMAIL PROTECTED]> wrote: > hey list. i stuck with gererating a wordlist from a changing > multidimensional array. each entry in the array contains a list with the > possible values. I am bit rusty, because it took me a little too long to make it work, but here is a recurs

Trouble exporting LD_LIBRARY_PATH

2005-09-30 Thread Shah
Setting: Perl 5.8.2 on Solaris 9 We need to set these 2 environment variables from Perl: $ENV{DB2INSTANCE} = 'db2inst3'; $ENV{LD_LIBRARY_PATH} = '/export/home/db2inst3/sqllib/lib'; We even tried enclosing them in a BEGIN block, but we're getting: install_driver(DB2) failed: Can't load '/usr/iw

How to export LD_LIBRARY_PATH from Perl

2005-09-30 Thread Shah
Setting: Perl 5.8.2 on Solaris 9 We need to set these 2 environment variables from Perl: $ENV{DB2INSTANCE} = 'db2inst3'; $ENV{LD_LIBRARY_PATH} = '/export/home/db2inst3/sqllib/lib'; We even tried enclosing them in a BEGIN block, but we're getting: install_driver(DB2) failed: Can't load '/usr/iw

RE: readdir question

2005-09-30 Thread Thomas Bätzler
Hi, Gergely Buday <[EMAIL PROTECTED]> wrote: > this is a working code snippet: > > opendir (DIR, $dir) || die "Open failed: $!\n"; > > $\ = "\n"; > while ($_ = readdir(DIR)) { print; }; > > But when I try to use > > while (readdir(DIR)) ... > > my script writes only empty lines. It seems that

readdir question

2005-09-30 Thread Gergely Buday
Hi, this is a working code snippet: opendir (DIR, $dir) || die "Open failed: $!\n"; $\ = "\n"; while ($_ = readdir(DIR)) { print; }; But when I try to use while (readdir(DIR)) ... my script writes only empty lines. It seems that the proper number of empty lines are written. Does the prepended