{ local $" = "\n"; open my $fh, '>', "$ENV{HOME}/number_list.txt" or die $!; print $fh "@list\n"; }