Please use a reference to an array rather than an actual array in:
sub create_output (\@$) { my (@array_of_lines, $entry_no_new) = @_;
as below:
use feature ":5.14"; use warnings FATAL => qw(all); use strict; use Data::Dump qw(dump pp); sub foo(\@) {my ($array) = @_; say "@$array"; } my @array = qw(1 2 3); foo(@array);
Produces
1 2 3
In reply to Re: problems passing variables between subroutine
by philiprbrenan
in thread problems passing variables between subroutines
by Freezer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |