From 7dae471a124247c4f978e22bfb00e4bd8541c5f7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 25 Jun 2009 10:31:21 +0200 Subject: checklinks: Don't use bareword filehandles --- bin/checklinks | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/checklinks b/bin/checklinks index 3798a23..1ee4839 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -28,8 +28,8 @@ GetOptions( 'p|parameter=s' => \%substitute, ); -open(LINKS, '<', $linkfile) or die("Can't open $linkfile: $!"); -while() { +open(my $links, '<', $linkfile) or die("Can't open $linkfile: $!"); +while(<$links>) { chomp; foreach my $key (keys(%substitute)) { s/\$$key/$substitute{$key}/g; @@ -44,7 +44,7 @@ while() { check_hardlink($src, $dst); } } -close(LINKS); +close($links); sub remove_link { my $link = shift; -- cgit v1.2.3