My first thought is to string multiply by the number of elements:
JB1: perl -e "print('?',',?'x (@ARGV-1));" a b c d e f
?,?,?,?,?,?
or
JB1: perl -e "print('?',',?'x (split(',',$ARGV[0])-1));" "a,b,c,d,e,f"
?,?,?,?,?,?
P.S. I get this on the latter...
Use of implicit split to @_ is deprecated at -e line 1.
When did it become deprecated?
-----Original Message-----
From: Jason Erickson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 3:12 PM
To: '[EMAIL PROTECTED]'
Subject: Shorter way to define placeholders...
I'm using placeholders to prepare several INSERT statements and was
wondering if there's an easier way of expressing how many values you are
going to pass to the execute statement. The tables I'm updating can have as
many as 41 columns, that's alot of question marks, and prone to errors....
Jason