Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jun 092010

How to print the current stack backtrace in Perl?


To print out the current stack backtrace in Perl, just insert the following code in your script and it will print out the stuff you need.

use Carp qw(cluck);
cluck "This is how we got here!";

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>