i know how to use the return in a modules to send info to the script but how do i send data to a module.
not sure if this works right...
--EXAMPLE--
(script.pl)
use crunch;
$user_input = 2;
print &crunch;
(crunch.pm)
sub crunch {
$user_input = 4;
$result = ();
return $result = $user_input + 4;
}
i assume by NOT using my or local ill be sending the modules information.
not sure if this works right...
--EXAMPLE--
(script.pl)
use crunch;
$user_input = 2;
print &crunch;
(crunch.pm)
sub crunch {
$user_input = 4;
$result = ();
return $result = $user_input + 4;
}
i assume by NOT using my or local ill be sending the modules information.