From 9491b94e7085f390c0ccd2e31f700eac8f5a1536 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 11 Mar 2009 09:47:50 -0700 Subject: Fix perlcritic warning about bare file handle Use 3 arg open. --- scripts/system/vyatta_update_syslog.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') 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; -- cgit v1.2.3