in reply to Refferal List

Okay first, s/refferral/referral/g;  : )

Then, add use strict; and use warnings; at the top of the file. If this is a CGI, you might also add use CGI::Carp('fatalsToBrowser') for more helpful error messages.

What I think what you're seeing is runaway recursion on build_reffers. Can you do away with the join statement and the subsequent return @ref? After all, you're just calling the subroutine in void context, so that code is just needlessly complicating things.

Update: Anomo++ for the explanation of why it recurses forever.

Replies are listed 'Best First'.
Re: Re: Refferal List
by Anonymous Monk on Nov 02, 2002 at 23:16 UTC
    @users is defined because it an implicit global variable. This explains why the program never exits. build_reffers keeps pushing onto the same global array and then recurses. This doesn't ever finish. This demonstrates why it is a good idea to use strict and use warnings. And why using my to delcare variables is a good idea. Not to mention the bad database design of storing join'ed values in a single field.