#! /usr/bin/env perl
-# Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
push(@INC, "${dir}perlasm", "perlasm");
require "x86asm.pl";
-$output = pop;
-open OUT,">$output";
-*STDOUT=*OUT;
+$output = pop and open STDOUT,">$output";
&asm_init($ARGV[0]);
&asm_finish();
-close STDOUT;
+close STDOUT or die "error closing STDOUT: $!";