Perl: the Markov chain saw | |
PerlMonks |
Concise code to list array elementsby tel2 (Pilgrim) |
on Apr 08, 2013 at 03:05 UTC ( [id://1027414]=perlquestion: print w/replies, xml ) | Need Help?? |
tel2 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
Is there a concise way of writing this?: $sth->execute($role[$row][1], $role[$row][2], $role[$row][3], $role[$row][4], $role[$row][5], $role[$row][6], $role[$row][7], $role[$row][8], $role[$row][9], $role[$row][10]); I tried this: $sth->execute($role[$row][1..10]; but that doesn't seem to work. I assume that's because the latter is a slice?
Thanks.
Back to
Seekers of Perl Wisdom
|
|