Code: Perl
my @data;
open(H,'yourFile.txt') or die $!;
while( my $line = <H>)
{
 push(@data,lc $line);
}

close H;
open(H,'>yourFile.txt') or die $!;
print H join("\n",@data);
close H;