# start gdb gdb /usr/bin/perl # inside gdb run the script run script.pl # after it segv's get the stack trace bt