in reply to Another scoping issue: How do I send 2 variables to my sub and use both.
You're passing in a list of two elements, so you need to shift the second one onto a more localized variable in order to access it within the subroutine.sub getPlatformFiles { my $plat_in = shift; my $nic = shift; my @list; if ($plat_in =~ /RedHat/) { @list = ("/etc-test/resolv.conf", "/etc-test/sysconfig/network-scripts/ifcfg-$nic->{de +vice}"); } return @list; }
--starX
www.axisoftime.com
|
---|