>>>>> "Steve" == Steve Howard <[EMAIL PROTECTED]> writes:

Steve> Thanks to all for the further discussion on this. After this
Steve> tonight, going back to my original question about reusable code
Steve> for binding columns, this makes for a slicker solution than I
Steve> even though would come from asking the question (and I know
Steve> some of you are slick) :-)

Well, when I first stumbled across bind_columns, I ignored it.
Then I saw someone use it, and I was hooked.
Then I played with

        $sth->bind_columns(\my $a, \my $b);

and thought that was really cool, for about five minutes until I came
up with:

        $sth->bind_columns(\my($a, $b, $c));

and that stayed in my Very Cool pile until someone asked about a varying
number of columns... so I remembered that \@foo[0..9] means
(\$foo[0], \$foo[1], through \$foo[9]), and came up with:

        $sth->bind_columns(\@foo[0..$#col_list]); # @col_list has names

But then you came along with your request, and that got me to think
about a hash slice instead.

So thank you for the question, because now I'm gonna go rewrite some
of my other code!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <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!

Reply via email to