my @finalnwlist = split (/\n/, join (' ', @networklist, @brnwlist, @vnwlist)); my @entries; sub update_exports { my $exports = 'exports'; open (EXPORTS,"; close (EXPORTS); open (TMP_EXP, ">> exports_tmp") || die "File not found"; foreach $a (@lines) { if ( $a =~ m/\*/) { logmsg "Generating unrestricted entry.."; my ($share, $permission) = split (/\*/, $a); for my $b (@finalnwlist) { @entries = join ('', $share, $b, $permission) ; print TMP_EXP @entries; } } else { print TMP_EXP $a; } } close(TMP_EXP); }