$|=1;
open IN,"< input.txt";    # open the filehandle for reading
open OUT,"> output.txt";  # open the filehandle for writing

$ruler = "1234567890" x 6;
print OUT "$ruler\n";      # we have to print the ruler first

while(defined($line=<IN>)){ # read the input file in a while/defined loop
  chomp $line;
  printf OUT "%20s\n",$string; # print it immediately
}
close IN;                  # don't forget to close your filehandles
close OUT;

