I received the following error, but I don't understand how to fix it. Help?
"readline() on closed filehandle IN at transcribe.pl line 21."
#!/usr/bin/perl
#transcribe.pl
#convert DNA to RNA (T to U)
use strict;
use warnings;
#TASK: Read DNA sequences from ‘DNAseq’ input file –
#there is one sequence per line
#For each sequence find the reverse complement and
#print it to ‘DNAseqRC’ output file
#open input and output files
open(IN,"~/Documents/fastafiles/Genomes/LuContig091010.fa");
open(OUT,">~/Documents/fastafiles/LuContig091010RNAcomp.fa");
#read the input file line-by-line
#for each line find the complimentary RNA
#print it in the output file
my $rcRNA;
while(<IN>){
chomp;
$rcRNA = revcompRNA($_);
print OUT "$rcRNA\n";
}
#close input and output files
close(IN);
close(OUT);
exit();
#definition of the function for reverse complement
sub revcompRNA{
my($DNAin) = @_;
my($RNAout) = reverse($DNAin);
$RNAout =~ tr/ACGT/UGCA/;
return $RNAout;
}