On Aug 6, 7:56 am, [EMAIL PROTECTED] (Amichai Teumim)
wrote:
> Mr. Shawn H. Corey wrote:
> > Amichai Teumim wrote:
> >> #!/usr/bin/perl
> >> #require 'lib.pl';

> > require 'lib.pl';

> >> @userArray = <STDIN>;
> >> $sum = sumIt(@userArray);
> >> print $sum;
>
> > If the sub sumIt() is in the file lib.pl, you have to tell perl where
> > to find it.

> I thought that
> require 'lib.pl';
> was telling Perl where to find it.

Yes, it would have, if that's what you had.  But you didn't.  You had
the line:
#require 'lib.pl'

That is, you had the line commented out.  A commented out line does
nothing at all.

Paul Lalli


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to