So that makes sense. (last index). Double check
shouldn't even be there. I must have incompletely removed the comment. So I should just delete it or comment it out? Chas Owens wrote: > On 8/6/07, Amichai Teumim <[EMAIL PROTECTED]> wrote: > snip > >> sub sumIt{ >> my $total; >> $total += $_ for @_; >> warn "@_ was empty, total undefined!\n" if !defined $total; >> } >> > snip > > This will return nothing useful. You need a return statement after the warn. > > >> sub avg(@) >> { >> my @arr = @_; >> my $arrSize = scalar(@arr); >> (last index). Double check >> return sumIt(@arr) / @arr; >> } >> > snip > >> Not enough arguments for index at obj13-lib.pl line 11, near "index)" >> Compilation failed in require at obj13-1.pl line 6. >> >> What is this index error? >> > snip > > You are getting that error because what used to be a comment is now > > (last index). Double check > > Next time you get an error message look at the line (in this case 11) > and see if there is anything obviously wrong with it. If there isn't > anything wrong with that line the problem is almost always above it. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/