I have the following code which needs to be corrected, as defined(@array)
is deprecated in the latest Perl.
my @inputs = (
( defined @{$padSrc-
You do not say what Perl version you use, so the following may work (if using Perl 5.10 or later) or not (if you are stuck with older versions), and since it is not very clear why you used defined
in the first place:
my @inputs = (
@{$padSrc->{inouts} // []},
@{$padSrc->{inputs} // []}
);
or even simpler:
my @inputs = map { @{$padSrc->{$_} // []} } qw/inouts inputs/;