in reply to Getting perl code to run sgid
The script was physically located on a partition mounted nosuid. Copied it to /usr/local/bin (instead of just symlinking) and it now works fine.