in reply to Re^2: Trouble usig a subroutine from a custom module
in thread Trouble usig a subroutine from a custom module
I copied the program to a file ~/_/0/1.pl and the module to ~/_/0/customPerlMod.pm. I changed the path to lib to actually point to the directory:
and added the following line:use lib $ENV{HOME} . '/_/0';
When I run the script, I get back the following line:print "<$string>\n";
<ll>
I get the same output when I drop the fully qualified name, as it's not needed with imported subroutines:
$string = trim ($string);
Prototypes are the ($) after subroutine names in their declarations. They tell Perl parser how to parse the arguments, they are not argument lists. If you don't know what they are and what they do, you should drop them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Trouble usig a subroutine from a custom module
by fritz1968 (Sexton) on Nov 11, 2024 at 21:34 UTC |