diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-06-25 10:31:21 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-06-25 10:31:21 +0200 |
commit | 7dae471a124247c4f978e22bfb00e4bd8541c5f7 (patch) | |
tree | 98803cfab3ae14839de2928caf21c3100a4f88d7 | |
parent | a1c51aeaed167dde53abeb611ab10bcca219b2da (diff) |
checklinks: Don't use bareword filehandles
-rwxr-xr-x | bin/checklinks | 6 |
1 files 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(<LINKS>) { +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(<LINKS>) { check_hardlink($src, $dst); } } -close(LINKS); +close($links); sub remove_link { my $link = shift; |