in reply to Re^2: change \n to \t
in thread change \n to \t
Actually, my DATA file is huge.Then you're probably doing the wrong way using two arrays to store the contents of the file. It is better to read, process and output one line at a time.
For example something like this:
This will be faster and will consume much less memory.open my $IN1, "<", "1.fa" or die "Cannot open input file"; open my $OUT, ">", "1.txt" or die "Cannot open output file"; while (my $line = <$IN1>) { # Do here whatever transformation/substitution you need to $line print $OUT $line; } close $IN1; close $OUT;
In Section
Seekers of Perl Wisdom