in reply to using pl/pm and require HELP !
Hi..
At the end of your myperlscript.pl you must put "1;" in order to return a true value!!
Example:
#sum.pl sub sum{ my($a,$b)=@_; my $res=$a+$b; return $res; } 1;
Calling this file with require
require "sum.pl"; $num1=5; $num2=10; $result=&sub($num1,$num2); print "$result";
I hope this helps and that i had understand the correctaly the question!!
Nuno
|
|---|