#open data file if (open(DNAInputFile, 'DNA_seq.txt')) { print "File DNA_seq.txt opened OK \n"; } else { print "Cannot open file DNA_seq.txt\n"; exit; } #read from file, store as array @ for array variable @DNA_array = ; close DNAInputFile; #close the input file $RNA = join('',@DNA_array); #convert array of chars to string $RNA =~ s/T/U/g; open(RNAOutputFile, ">RNA_out.txt"); print RNAOutputFile "Here is the result of transcribing "; print RNAOutputFile "the DNA to RNA (T to U): \n\n"; print RNAOutputFile "$RNA\n"; close RNAOutputFile; exit;