Amichai Teumim wrote:
When I do this, I get :

./script.pl <<EOD
1234
5678
90
EOD

Undefined subroutine &main::sumIt called at ./script.pl line 7, <STDIN>
line 3.

#!/usr/bin/perl

#require 'script.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.


--
Just my 0.00000002 million dollars worth,
 Shawn

"For the things we have to learn before we can do them, we learn by doing them."
 Aristotle

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


Reply via email to