Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Dynamic SQL Bind values

by blogical (Pilgrim)
on Apr 23, 2006 at 01:48 UTC ( #545109=note: print w/replies, xml ) Need Help??


in reply to Dynamic SQL Bind values

my @columns       = @{ shift };
doesn't work, use
my @columns       = @{ $_[0] };
(or don't bother with the temps, they were thrown in for clarity. My bad. )

"One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
- Henry David Thoreau, Walden

Replies are listed 'Best First'.
Re^2: Dynamic SQL Bind values
by ChemBoy (Priest) on Apr 23, 2006 at 18:09 UTC

    Actually, it can be made to work by adding a + to the beginning: @{shift} treats "shift" as a string, and looks for a variable named @shift (which would—obligatory plug—be caught by use strict 'vars'), but @{+shift} forces it to use the keyword shift, which is what you were expecting it to do.



    If God had meant us to fly, he would *never* have given us the railroads.
        --Michael Flanders

      Danke chemboy.

      "One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
      - Henry David Thoreau, Walden

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://545109]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2022-10-06 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?