sub verify_files { my( $whitelist ) = @_; open( my $FILE, '<', $whitelist ) or die "Could not open file '$whitelist': $!"; chomp( my @correct_hashes = <$FILE> ); close $FILE; ... }