in reply to Running Parallel Perl Script on Linux Cluster

off the top of my head (untested)
foreach ($first,$second)(param1, param2, param3, param4) { system("qsub runcode.sh $first $second"); }
then...unless your mycode.pl somehow returns control before finishing...test for $2 being the last parameter value (in runcode.sh just after calling mycode.pl) and concat.
the hardest line to type correctly is: stty erase ^H