in reply to Re^4: Perl variable scoping between functions
in thread Perl variable scoping between functions
Have you tested fLoadModules in isolation, by passing it a hardcoded string?
I think the original problem comes from this line, which assigns $modules the number of found modules:
my $modules = fLoadModules $modules_path;
If you want to receive a list back instead of the number of modules, you need to have a list on the left hand side of the assignment:
my @modules = fLoadModules $modules_path;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Perl variable scoping between functions
by Bryan882 (Novice) on Jul 18, 2018 at 12:43 UTC |