[28379] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9743 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 20 09:05:51 2006

Date: Wed, 20 Sep 2006 06:05:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 20 Sep 2006     Volume: 10 Number: 9743

Today's topics:
    Re: array of hashes with a little more... usenet@DavidFilmer.com
    Re: array of hashes with a little more... <tadmc@augustmail.com>
    Re: array of hashes with a little more... anno4000@radom.zrz.tu-berlin.de
        How do I find the Nth index of array that is (whatever) usenet@DavidFilmer.com
    Re: How do I find the Nth index of array that is (whate <someone@example.com>
    Re: How do I find the Nth index of array that is (whate usenet@DavidFilmer.com
    Re: How do I find the Nth index of array that is (whate <bik.mido@tiscalinet.it>
    Re: How do I find the Nth index of array that is (whate <peace.is.our.profession@gmx.de>
    Re: How do I find the Nth index of array that is (whate <mumia.w.18.spam+nospam.usenet@earthlink.net>
        Ms-Word Ole and multiple independent instances. <rudy.vaneeckhout@gmail.com>
        new CPAN modules on Wed Sep 20 2006 (Randal Schwartz)
        Problem with DBD::DB2 on AIX. <shah@typhoon.xnet.com>
    Re: Question on download by LWP <tadmc@augustmail.com>
        Windows 2000/XP: Owner of a File <junk@dlink.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 19 Sep 2006 19:04:35 -0700
From: usenet@DavidFilmer.com
Subject: Re: array of hashes with a little more...
Message-Id: <1158717875.079376.322330@h48g2000cwc.googlegroups.com>

mikeybe wrote:

> I only have to edit the deweystring array. I need to
> create the hash keys from a variable name (@deweystring), I need to
> dynamically analyze each line to determine which hash key it belongs
> in...so if a record had a dewey number of 654 it would be determined
> that it belongs in the 600-700 hash key array

Since the total number of dewey integers is rather small, I would just
build myself a hash up-front which (for the example you cited) would
have a pair like:
   $range{654} = '600-700';
That way, every time I saw a dewey number, I could easily look up what
range it belongs to in that hash by looking at the integer key. I need
to insure consistent handling of leading zeros (either always strip
them or always format them - I took the strip approach - but only for
the internal range look-up; leading zeros are preserved in the output).

> The data structure is exactly what I want. I just don't know the syntax
> to create this structure using variables from within the program...

How about this:

#!/usr/bin/perl
   use strict; use warnings;
   use Data::Dumper;

   my @deweys=qw{000-099 100-199 200-299 300-399 400-499 500-599};
   my %range;   #quick-lookup to determine dewey range for any integer
   foreach my $range(@deweys) {
      my ($low, $high) = split(/-/, $range);
      $range{int $_} = $range for ($low..$high); #strip leading zeros
   }

   my %catalog;
   while (my $input_line = <DATA>) {
      chomp $input_line;
      my ($isbn, $dewey, $title, $author) = split(/\|/, $input_line);
      push @{$catalog{$range{int $dewey}}}, {  #int() strips leading 0
         'title' => $title,
         'author' => $author,
         'isbn'   => $isbn,
         'dewey'  => $dewey,
      }
   }

   #print Dumper \%catalog;

   foreach my $range (keys %catalog) {
      print "Range: $range\n";
      print "\t$$_{'dewey'} - $$_{'title'}\n" for @{$catalog{$range}};
   }

__DATA__
01235|003.2|Perl|smith
11111|123.45|php|smith
11111|125.001|Python|smith
22222|345|C++|jones
33333|578|Ruby|brown


 I
> have seen the type of structure you list in books and online...However,
> I don't have the data ahead of time to put the information in the way
> you listed it. It comes from variables and I want it to so when I want
> to change it,  and the data will need to
> be added to that array. I know how to, if given dewey number of 657
> return the string from @deweystring "600_700"... I don't know how to
> then feed the information into the hash key array with that same name
> (i.e. $catalog{'600_700'}).
>
> So, in short, I need to know the syntax of (a) creating the hash names
> using the deweystring list (i.e. 000_100 100_200 200_300), (b) adding
> the data to the hash arrays on the fly, and (c) extracting the data
> from them.
> 
> Thanks again,
> Mike



------------------------------

Date: Tue, 19 Sep 2006 22:10:34 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: array of hashes with a little more...
Message-Id: <slrneh1c9a.9fa.tadmc@magna.augustmail.com>

MikeBeccaria@gmail.com <MikeBeccaria@gmail.com> wrote:


[ Please provide an attribution when you quote someone. ]


>>    $catalog{'000-100'} = [
>>       {'isbn' => '12345', 'dewey' => 'abc123', 'title' => 'foo'},
>>       {'isbn' => '67890', 'dewey' => 'xyz987', 'title' => 'bar'},
>>    ];

> The data structure is exactly what I want. I just don't know the syntax
> to create this structure using variables from within the program...


   perldoc perlreftut


> I know how to, if given dewey number of 657
> return the string from @deweystring "600_700"... I don't know how to
> then feed the information into the hash key array with that same name
> (i.e. $catalog{'600_700'}).


Apply "Use Rule 1" from perlreftut:

1) pretend it is a plain array

   push @somearray, {'isbn' => '12345', 'dewey' => 'abc123'};

2) replace the name of the array with a block

   push @{       }, {'isbn' => '12345', 'dewey' => 'abc123'};

3) put something in the block that returns the right kind of reference

   push @{ $catalog{'600_700'} }, {'isbn' => '12345', 'dewey' => 'abc123'};


> So, in short, I need to know the syntax of (a) creating the hash names
                                                              ^^^^^^^^^^

You are befuddling the terminology, which can befuddle your thinking.

There is only _one_ "hash name", and it is "catalog".

I think you meant to ask about creating hash _keys_ rather than hash names?


> using the deweystring list (i.e. 000_100 100_200 200_300), 


You do not need to create the (top) hash keys.

Just use them, and autovivification will create them for you.


> (b) adding
> the data to the hash arrays on the fly, and (c) extracting the data
> from them.


More applications of "Use Rule 1" should handle those too.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 20 Sep 2006 12:40:47 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: array of hashes with a little more...
Message-Id: <4ncr6fF9r83gU1@news.dfncis.de>

 <usenet@DavidFilmer.com> wrote in comp.lang.perl.misc:
> mikeybe wrote:
> 
> > I only have to edit the deweystring array. I need to
> > create the hash keys from a variable name (@deweystring), I need to
> > dynamically analyze each line to determine which hash key it belongs
> > in...so if a record had a dewey number of 654 it would be determined
> > that it belongs in the 600-700 hash key array
> 
> Since the total number of dewey integers is rather small, I would just
> build myself a hash up-front which (for the example you cited) would
> have a pair like:
>    $range{654} = '600-700';
> That way, every time I saw a dewey number, I could easily look up what
> range it belongs to in that hash by looking at the integer key. I need
> to insure consistent handling of leading zeros (either always strip
> them or always format them - I took the strip approach - but only for
> the internal range look-up; leading zeros are preserved in the output).

At this point the module Tie::RangeHash ("Hashes with 'low,high' ranges
as keys") comes to mind.  I have never used it, but from the description
it fits the situation exactly.

Anno


------------------------------

Date: 20 Sep 2006 00:53:53 -0700
From: usenet@DavidFilmer.com
Subject: How do I find the Nth index of array that is (whatever)
Message-Id: <1158738833.634393.74200@e3g2000cwe.googlegroups.com>

Suppose I have an array like this:

   my @array = ('foo', '', 'bar', '', '', '', 'baz', '');

and I want to find the index value of the third undefined element.  I
can do something really ugly like this:

   my $search_for = 3; #find index of third undefined element

   my $undefined = 0;
   foreach my $index(0..$#array) {
      $undefined++ unless $array[$index];
      if ($undefined == $search_for) {
         print "Index of undefined element #$search_for is $index\n";
         next;
      }
   }

but I HATE THAT CODE.  It's ugly. It's inelegant.  It's an offense to
human dignity.  It increases global warming.  Is there a better (and
more environmentally safe) technique?

-- 
David Filmer (http://DavidFilmer.com)



------------------------------

Date: Wed, 20 Sep 2006 07:58:51 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: How do I find the Nth index of array that is (whatever)
Message-Id: <%w6Qg.33268$E67.3297@clgrps13>

usenet@DavidFilmer.com wrote:
> Suppose I have an array like this:
> 
>    my @array = ('foo', '', 'bar', '', '', '', 'baz', '');
> 
> and I want to find the index value of the third undefined element.

Your array doesn't have ANY undefined elements.


John
-- 
use Perl;
program
fulfillment


------------------------------

Date: 20 Sep 2006 01:02:24 -0700
From: usenet@DavidFilmer.com
Subject: Re: How do I find the Nth index of array that is (whatever)
Message-Id: <1158739344.103438.123980@e3g2000cwe.googlegroups.com>

John W. Krahn wrote:

> Your array doesn't have ANY undefined elements.

'Scuse me - I mean false values (per Perl's boolean conventions)

-- 
David Filmer (http://DavidFilmer.com)



------------------------------

Date: 20 Sep 2006 11:37:24 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How do I find the Nth index of array that is (whatever)
Message-Id: <d122h21halgon74jvatrmbbtkan17opbh8@4ax.com>

On 20 Sep 2006 00:53:53 -0700, usenet@DavidFilmer.com wrote:

>Suppose I have an array like this:
>
>   my @array = ('foo', '', 'bar', '', '', '', 'baz', '');
>
>and I want to find the index value of the third undefined element.  I
                                                 ^^^^^^^^^
                                                 ^^^^^^^^^

Ok, I know you mean false...

>can do something really ugly like this:

>   my $search_for = 3; #find index of third undefined element

  print +(grep !$array[$_], 0..$#array)[2], "\n";

But of course this will do more work than necessary, since it will
cycle on 0..$#array even after it has found the wanted one. This may
or may not be a big issue depending on what your actual data looks
like.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Wed, 20 Sep 2006 12:23:39 +0200
From: Mirco Wahab <peace.is.our.profession@gmx.de>
Subject: Re: How do I find the Nth index of array that is (whatever)
Message-Id: <eer537$5oe$1@mlucom4.urz.uni-halle.de>

Thus spoke Michele Dondi (on 2006-09-20 11:37):


> 
>   print +(grep !$array[$_], 0..$#array)[2], "\n";

This looks nice (I didn't think of pulling all
false elements to a list). Another approach would
be the 'naive' map:

   ...
   $loc = $search_for;
   ($index) = map !$array[$_] && !--$loc ? $_:(), 0..$#array;
   ...

or
   ...
   $loc = $search_for;
   print +(map !$array[$_] && !--$loc ? $_ : (), 0..$#array), "\n";
   ...

(but your's 's more fancier somehow:-)

Regards

Mirco


------------------------------

Date: Wed, 20 Sep 2006 10:29:03 GMT
From: "Mumia W." <mumia.w.18.spam+nospam.usenet@earthlink.net>
Subject: Re: How do I find the Nth index of array that is (whatever)
Message-Id: <PJ8Qg.13985$bM.12633@newsread4.news.pas.earthlink.net>

On 09/20/2006 02:53 AM, usenet@DavidFilmer.com wrote:
> Suppose I have an array like this:
> 
>    my @array = ('foo', '', 'bar', '', '', '', 'baz', '');
> 
> and I want to find the index value of the third undefined element.  I
> can do something really ugly like this:
> 
>    my $search_for = 3; #find index of third undefined element
> 
>    my $undefined = 0;
>    foreach my $index(0..$#array) {
>       $undefined++ unless $array[$index];
>       if ($undefined == $search_for) {
>          print "Index of undefined element #$search_for is $index\n";
>          next;
>       }
>    }
> 
> but I HATE THAT CODE.  It's ugly. It's inelegant.  It's an offense to
> human dignity.  It increases global warming.  Is there a better (and
> more environmentally safe) technique?
> 

Would it be any less ugly to you if you wrapped it up in a sub?

     use strict;
     use warnings;
     use Alias qw(alias);
     my @array = ('foo', '', 'bar', '', '', '', 'baz', '');
     my $find_empty = nth_empty_mapper(\@array);
     my $search_for = 3; # find index of third undefined element
     my $search_for_pf = ctrpostfix($search_for);

     print "Index of $search_for_pf undefined element"
     . " is $find_empty->{$search_for}\n";

     sub nth_empty_mapper {
         our @array;
         alias array => shift();
         my %mapper;
         my $empty = 0;
         foreach my $count (0..$#array) {
             unless ($array[$count]) {
                 $mapper{$empty++} = $count;
             }
         }
         \%mapper;
     }

     sub ctrpostfix {
         my $num = shift();
         $num == 1 ? "${num}st" :
         $num == 2 ? "${num}nd" :
         $num == 3 ? "${num}rd" :
         "${num}th" ;
     }


Wouldn't the code in ctrpostfix be uglier if it were not wrapped up in a 
sub?


------------------------------

Date: 20 Sep 2006 02:25:13 -0700
From: "Rudy Van Eeckhout" <rudy.vaneeckhout@gmail.com>
Subject: Ms-Word Ole and multiple independent instances.
Message-Id: <1158744313.551371.156760@m73g2000cwd.googlegroups.com>

Hello all,

   I do have several perl scrips whicht opens by ole an word instance
which is used to print a document to a certain printer.  Now we noted
that these documents sometimes appear on the wrong printer. After some
investiation is did seen next effect.
First assume next script

   my $Word= Win32::OLE->CreateObject('Word.Application', 'Quit');
   $openWord->{'Visible'} = 0;
   $Word->{ActivePrinter} = "$printer";
   <STDIN> ; #Wait for a cariage return
   print $Word->{ActivePrinter} ."\n" ;

When i run this script with $printer set to printerA and i do wait to
give a cariage return until i did run the script in a second form with
$printer set to printerB. The both script will print as active printer
printerB. This means that the assingment of Activeprinter is done for
all instances which are running.

Even when you try this manualy by opening 2 word sessions  you can see
that the printer changes over the different sessions.

If you start msword from the command line with the /w option the
problem disapears.
Now i can not find out how to do this over perl OLE.

Is there anybody who knows how to sole this over OLE?

   Kind regards.

    Rudy.



------------------------------

Date: Wed, 20 Sep 2006 04:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Sep 20 2006
Message-Id: <J5vJq8.uo4@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Acme-Lingua-Pirate-Perl-0.13
http://search.cpan.org/~hex/Acme-Lingua-Pirate-Perl-0.13/
be writin' thy Perl like a swarthy sea-dog
----
Any-Renderer-1.014
http://search.cpan.org/~bbc/Any-Renderer-1.014/
Common API for modules that convert data structures into strings
----
CIAO-Lib-Param-0.06
http://search.cpan.org/~djerius/CIAO-Lib-Param-0.06/
an interface to the CIAO parameter library.
----
CPAN-1.87_65
http://search.cpan.org/~andk/CPAN-1.87_65/
query, download and build perl modules from CPAN sites
----
Cache-Memcached-Semaphore-0.3
http://search.cpan.org/~zmij/Cache-Memcached-Semaphore-0.3/
a simple pure-perl library for cross-machine semaphores using memcached.
----
Catalyst-Devel-1.01
http://search.cpan.org/~mramberg/Catalyst-Devel-1.01/
Catalyst Development Tools
----
Catalyst-Runtime-5.7002
http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7002/
Catalyst Runtime version
----
Class-DBI-Plugin-AccessionSearch-0.01
http://search.cpan.org/~nekokak/Class-DBI-Plugin-AccessionSearch-0.01/
easliy add search atters.
----
CommitBit-0.01
http://search.cpan.org/~jesse/CommitBit-0.01/
An opensource project administration tool
----
DBIx-Timeout-1.01
http://search.cpan.org/~samtregar/DBIx-Timeout-1.01/
provides safe timeouts for DBI calls
----
Data-Report-0.06
http://search.cpan.org/~jv/Data-Report-0.06/
Framework for flexible reporting
----
Data-UUID-0.145
http://search.cpan.org/~rjbs/Data-UUID-0.145/
Perl extension for generating Globally/Universally Unique Identifiers (GUIDs/UUIDs).
----
Dir-Purge-1.02
http://search.cpan.org/~jv/Dir-Purge-1.02/
Purge directories to a given number of files.
----
Email-Store-0.254
http://search.cpan.org/~rjbs/Email-Store-0.254/
Framework for database-backed email storage
----
GIS-Distance-0.01000
http://search.cpan.org/~bluefeet/GIS-Distance-0.01000/
Calculate geographic distances.
----
Geography-JapanesePrefectures-Walker-0.01
http://search.cpan.org/~nekokak/Geography-JapanesePrefectures-Walker-0.01/
Geography::JapanesePrefectures's wrappers.
----
Geography-JapanesePrefectures-v0.0.5
http://search.cpan.org/~tokuhirom/Geography-JapanesePrefectures-v0.0.5/
Japanese Prefectures Data.
----
Google-Adwords-v0.2.0
http://search.cpan.org/~rohan/Google-Adwords-v0.2.0/
an interface which abstracts the Google Adwords SOAP API
----
IO-Socket-Multicast6-0.02
http://search.cpan.org/~njh/IO-Socket-Multicast6-0.02/
Send and receive IPv4 and IPv6 multicast messages
----
IPC-Run3-0.036
http://search.cpan.org/~rjbs/IPC-Run3-0.036/
run a subprocess in batch mode (a la system) on Unix, Win32, etc.
----
Lingua-StopWords-0.07
http://search.cpan.org/~creamyg/Lingua-StopWords-0.07/
Stop words for several languages
----
Lingua-StopWords-0.08
http://search.cpan.org/~creamyg/Lingua-StopWords-0.08/
Stop words for several languages
----
Mail-Audit-2.210
http://search.cpan.org/~rjbs/Mail-Audit-2.210/
Library for creating easy mail filters
----
Mail-Audit-2.211
http://search.cpan.org/~rjbs/Mail-Audit-2.211/
Library for creating easy mail filters
----
Net-SAP-0.10
http://search.cpan.org/~njh/Net-SAP-0.10/
Session Announcement Protocol (rfc2974)
----
Net-SDP-0.07
http://search.cpan.org/~njh/Net-SDP-0.07/
Session Description Protocol (rfc2327)
----
Object-Accessor-0.30
http://search.cpan.org/~kane/Object-Accessor-0.30/
----
Object-InsideOut-2.01
http://search.cpan.org/~jdhedden/Object-InsideOut-2.01/
Comprehensive inside-out object support module
----
POE-0.38
http://search.cpan.org/~rcaputo/POE-0.38/
portable multitasking and networking framework for Perl
----
POE-Filter-FSSocket-0.03
http://search.cpan.org/~ptinsley/POE-Filter-FSSocket-0.03/
a POE filter that parses FreeSWITCH events into hashes
----
Perlbal-XS-HTTPHeaders-0.19
http://search.cpan.org/~marksmith/Perlbal-XS-HTTPHeaders-0.19/
Perlbal extension for processing HTTP headers.
----
Portage-Conf-Packages-1.0
http://search.cpan.org/~vileda/Portage-Conf-Packages-1.0/
Function collection for the Gentoo Portage package.* files.
----
Portage-Conf-Packages-1.1
http://search.cpan.org/~vileda/Portage-Conf-Packages-1.1/
Function collection for the Gentoo Portage package.* files. =cut =head1 SYNOPSIS use Portage::Conf::Packages; $mod = Portage::Conf::Packages->new(UsePath => './package.use'); if ($mod->validatePackage
----
Portage-Conf-Packages-1.2
http://search.cpan.org/~vileda/Portage-Conf-Packages-1.2/
Function collection for the Gentoo Portage package files.
----
Sledge-Plugin-JSONRPC-0.01
http://search.cpan.org/~nekokak/Sledge-Plugin-JSONRPC-0.01/
JSONRPC plugin for Sledge
----
TM-1.16
http://search.cpan.org/~drrho/TM-1.16/
Topic Maps, Base Class
----
Template-Plugin-JapanesePrefectures-0.01
http://search.cpan.org/~nekokak/Template-Plugin-JapanesePrefectures-0.01/
easliy use Geography::JapanesePrefectures.
----
Test-Count-0.0102
http://search.cpan.org/~shlomif/Test-Count-0.0102/
Module for keeping track of the number of tests in a Test Script.
----
Test-Trap-0.000016
http://search.cpan.org/~ebhanssen/Test-Trap-0.000016/
Trap exit codes, exceptions, output, etc.
----
WWW-Pagination-0.35
http://search.cpan.org/~ondr/WWW-Pagination-0.35/
paginal navigation on a site
----
mediawiki-graph-0.21
http://search.cpan.org/~tels/mediawiki-graph-0.21/


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Wed, 20 Sep 2006 05:30:50 +0000 (UTC)
From: Hemant Shah <shah@typhoon.xnet.com>
Subject: Problem with DBD::DB2 on AIX.
Message-Id: <eeqjma$hmd$1@new7.xnet.com>


Folks,

  I am having problem with my perl script that uses DBD::DB2 and inserts
  data into a table. I am trying to write a generic script that will
  read table name, column name and data from a file and dynamically
  build sql insert statement and insert data into the table.

  The input file looks like:

tablename:col1,col2,col3
data1,data2,data3
data1,data2,data3
data1,data2,data3
  .
  .
  .
  .


The problem I have is that if I dynamically build the insert statement
then the data does not get inserted into the database and I do not get
any error. I intentionally wrong column name for one of the columns and
I do do not get any errors. If I hard code the insert statement and I get
error.


Here is how I build my statement:


   # Build insert statement.
   $InsStmt = "INSERT INTO ${TargetTableName} (";
   my $ColumnsArraySize = @ColumnsArray;
   for (my $i = 0; $i < $ColumnsArraySize; $i++) 

   {
      if ($i == ($ColumnsArraySize -1))
      {     
         $InsStmt .= $ColumnsArray[$i] . ")\n";
      }     
      else  
      {     
         $InsStmt .= $ColumnsArray[$i] . ", "; 
      }     
   }
   $InsStmt .= "VALUES (";
   for (my $i = 0; $i < $ColumnsArraySize; $i++) 

   {
      if ($i == ($ColumnsArraySize -1))
      {     
         $InsStmt .= "?);\n";
      }     
      else  
      {     
         $InsStmt .= "?, ";
      }     
   }

   print "$InsStmt\n";



Output:
INSERT INTO DWH_PLIN (ACCESS_KEY, QUE_KEY, PLAN_CODE_TYPE)
VALUES (?, ?, ?);



If I hard code the statement as follows:

$InsStmt = "INSERT INTO DWH_PLIN (ACCESS_KEY, QUE_KEY, PLAN_CODE_TYPE)
VALUES (?, ?, ?);"

Then I get error that I should get.

What could cause this problem?
How do I solve it?

-- 
Hemant Shah                           /"\  ASCII ribbon campaign
E-mail: NoJunkMailshah@xnet.com       \ /  --------------------- 
                                       X     against HTML mail
TO REPLY, REMOVE NoJunkMail           / \      and postings      
FROM MY E-MAIL ADDRESS.           
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind,                Above opinions are mine only.
it's backed up on tape somewhere.      Others can have their own.


------------------------------

Date: Tue, 19 Sep 2006 22:14:22 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Question on download by LWP
Message-Id: <slrneh1cge.9fa.tadmc@magna.augustmail.com>

Wonder <sapience@gmail.com> wrote:


> Besides, this is probably a silly question: if I put quotation marks
> around the $response member variables, such as
> 
> print "$response->content";
> 
> I'll get a line "HTTP::Response=HASH(0x104832bc)->content". Why is
> that?


Part 1: you get the "->content" part because subroutines (and methods)
do not interpolate.

Part 2: you get the "HTTP::Response=HASH(0x104832bc)" part because
that is the stringified representation for a blessed reference (object).


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 20 Sep 2006 01:39:21 -0700
From: "Aqua" <junk@dlink.org>
Subject: Windows 2000/XP: Owner of a File
Message-Id: <1158741561.174138.297770@m7g2000cwm.googlegroups.com>


Dear Group,

In Windows 2000/XP how do I find an owner of a file which is present in
a network drive.

G:\sample\file\myfile.txt

Domain: testdomain

Regards
Dominic



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9743
***************************************


home help back first fref pref prev next nref lref last post