[Chicago-talk] Strange file creation

brian d foy brian.d.foy at gmail.com
Thu Oct 5 12:46:38 PDT 2006

On 10/5/06, Eric Ellington <e.ellington at gmail.com> wrote:
> The whole thing is huge, but here is the whole makefile sub. I am
> thinking that @info is being filled with junk sometimes. Sometimes
> these files have function names like "Date_Cmp($d ". How can a list be
> filled with code from the program?
> sub makefile
>   {
>     my($date, $fn, @info) = @_;
>     my $filename = $fn . $date . '.csv';
>     print $filename,"\n";

This is where Carp's cluck() function comes in handy. It can give you
a backtrace to help you find who's passing what to which function.
However, in its present form it needs a little extra help, so check
out the modifications I made to Carp::format_arg for the debugging
chapter of Mastering Perl:


brian d foy <brian.d.foy at gmail.com>

More information about the Chicago-talk mailing list