$|=1;
open IN,"< input.txt";    # open the filehandle for reading
open OUT,"> output.txt";  # open the filehandle for writing

@strings = <IN>;           # read the input file (IN stream)
chomp @strings;

$ruler = "1234567890" x 6;
print OUT "$ruler\n";      # print to output file (OUT stream)

foreach $e (@strings){
  printf OUT "%20s\n",$e;  # also works for printf
}

close IN;                  # don't forget to close your filehandles
close OUT;
