I have some Perl code where I am trying to return a value from a subroutine, but I'm getting all kinds of errors. Here is the code I have:

while($sth->fetch())
{
# if($leventid ==...