in reply to Re: Re: Re: DBI execute() args in array format (or similar) possible?
in thread DBI execute() args in array format (or similar) possible?

Brother snafu, I fear you have stumbled onto a series of incantions that appear to work, but that you still do not understand the underlying problem. Consider:   eval {join(',', @args), return(@args)} has the same affect as   eval {return(@args)} since the join() has no side-effect. In turn, these have the same effect as     eval {@args} and   @args

The execute() method wants distinct arguments ie execute(arg1,arg2,arg3) vs execute(qw(arg1,arg2,arg3)) which is the same, of course, as execute(@args).

if @args hold (1,2,3), then

are equivalent, but is not equivalent, since qw(1,2,3) is an list that contains a single element. It's the whitespace that's significant in qw(), not the commas.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: DBI execute() args in array format (or similar) possible?
by snafu (Chaplain) on Aug 14, 2002 at 17:08 UTC
    Oops! Don't you hate it when you put something in your writeup that is a typo? Note the change I made to my post prior to your reply. I fixed my typo.

    Now, I absolutely agree with your statements. This is why I am so baffled by the situation and get this...it works now using the simple execute(@args) but I swear on everything I know that I did *not* make any changes to the code with the exception of changing to '@args' from the join() statement. However, that works now. It is all very strange and indeed I bet that I will stumble across this little phenomenon again somewhere. Maybe it was the command line args I was using *shrug*. If you read my other posts you will see that @args was most certainly giving off the correct number of elements (I pasted a few outputs where I was trying to show that...they are numbered elements).

    Anyway, I sincerely appreciate all of your comments.

    _ _ _ _ _ _ _ _ _ _
    - Jim
    Insert clever comment here...