in reply to Trouble usig a subroutine from a custom module
Without exporting them, you have to call them fully qualified:
$string = customPerlMod::trim($string);
Or, export them:
and then in the using code:package customPerlMod; use Exporter 'import'; our @EXPORT_OK = qw( trim ltrim rtrim );
use customPerlMod qw{ trim }; $string = trim($string);
Other problems I noticed:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble usig a subroutine from a custom module
by stevieb (Canon) on Nov 09, 2024 at 08:48 UTC | |
|
Re^2: Trouble usig a subroutine from a custom module
by fritz1968 (Sexton) on Nov 11, 2024 at 16:01 UTC | |
by choroba (Cardinal) on Nov 11, 2024 at 16:23 UTC | |
by fritz1968 (Sexton) on Nov 11, 2024 at 21:34 UTC |