open my $fh, '>', 'zeros' or die "error opening fh: ($!)"; binmode $fh; print $fh pack "x512"; #512 bytes-- season to taste, loop as needed