summaryrefslogtreecommitdiff
path: root/scripts/system
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-11 09:47:50 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-11 13:37:57 -0700
commit9491b94e7085f390c0ccd2e31f700eac8f5a1536 (patch)
tree943612f925c0261e12ca208cf8e1338471fa2c6c /scripts/system
parentb528d9ab2e06e7167281f46dcbed45a68462ab0d (diff)
downloadvyatta-cfg-system-9491b94e7085f390c0ccd2e31f700eac8f5a1536.tar.gz
vyatta-cfg-system-9491b94e7085f390c0ccd2e31f700eac8f5a1536.zip
Fix perlcritic warning about bare file handle
Use 3 arg open.
Diffstat (limited to 'scripts/system')
-rwxr-xr-xscripts/system/vyatta_update_syslog.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/system/vyatta_update_syslog.pl b/scripts/system/vyatta_update_syslog.pl
index e6a381f7..d02d8be0 100755
--- a/scripts/system/vyatta_update_syslog.pl
+++ b/scripts/system/vyatta_update_syslog.pl
@@ -36,10 +36,10 @@ if ($exp2 ne "") {
}
}
-open(OUT, ">>$SYSLOG_CONF") or exit 4;
if ($update_line ne "") {
- print OUT "$update_line";
+ open my $out, '>>', $SYSLOG_CONF or exit 4;
+ print {$out} "$update_line";
+ close $out;
}
-close OUT;
exit 0;