for box in `cat /tmp/testboxes` do ssh $box 'your perl code here -- not the script file name' \ > /tmp/$box.data done