#!/bin/sh strace -o /tmp/strace.out -efile /path/to/your-cgi-script.pl