-----Original Message----- >From: Amichai Teumim <[EMAIL PROTECTED]> >Sent: Aug 6, 2007 10:34 AM >To: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> >Cc: beginners@perl.org >Subject: Re: library (random numbers) > >I just renamed it to obj13-1.pl from script.pl > >So it looks now like this: > >#!/usr/bin/perl > >use strict; >use warnings; > >require 'obj13-lib.pl'; > >my @userArray = <STDIN>; > >my $sum = sumIt(@userArray); > >print $sum; > >and the library I renamed to: obj13-lib.pl and now looks like this: > > >sub sumIt{ > my $total; > $total += $_ for @_; > warn "@_ was empty, total undefined!\n" if !defined $total; >} > >sub avg(@) >{ > my @arr = @_; > my $arrSize = scalar(@arr);
>(last index). Double check I don't know what's this line.Maybe it's a comment? -- Jeff Pang <[EMAIL PROTECTED]> http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/