in reply to Another scoping issue: How do I send 2 variables to my sub and use both.
your sub should look like thismy @files = getPlatformFiles($platform, $nic->{device});
sub getPlatformFiles { my $plat_in = shift; my $nic_device_in = shift; my @list; if ($plat_in =~ /RedHat/) { @list = ("/etc-test/resolv.conf", "/etc-test/sysconfig/network-scripts/ifcfg-$nic_device_in +"); } return @list; }
|
|---|