#!/usr/local/bin/perl unless (open(INFILE, "in.txt")) { die ("Input file infile cannot be opened.\n"); } if (-e "outfile") { print STDERR ("outfile file outfile already exists.\n"); print("output file will be erased [y/n]\n"); $car=; chop($car); if ($car ne "y"){ die ("It is your choise!\n"); } } unless (open(OUTFILE, ">outfile")) { die ("Output file outfile cannot be opened.\n"); } print("writing to file...\n"); $line = ; while ($line ne "") { chop ($line); print OUTFILE ("\U$line\E\n"); $line = ; } print("Done\n"); print ('press ENTER to EXIT'); $in = ;