From: Stefan Kruger Date: 2008-11-10T23:05:58+09:00 Subject: Passing array instead of individual parameters? [New to this fine language, from a Perl background] I expected (wrongly) the following to work - def myroutine(one, two, three) puts "first: #{one} second: #{two} third: #{three}" end myroutine('brave', 'new', 'world') # as expected # The unexpected (to me) myparamlist = ['brave', 'new', 'world'] myroutine(myparamlist) # fails So, my question is - is there a way of calling a routine expecting N parameters with a list containing N elements instead? Specifically, using the dbi module, I expected to be able to say: sth.prepare("insert into foo (one, two, three) values (?, ?, ?)") sth.execute(my_list_of_three_values) but instead I need to loop through the list and bind each one in turn? Many thanks, stefan -- Stefan Kruger