use strict; open (my $info, '>', 'info.txt') or die "info.txt: $!"; print $info qx(systeminfo); close($info)