In your original program, you slurped the whole file into memory using
and then used the array @DNA for processing the data. Of course it would be better to write your program in a way that it reads only one line at a time, but if the logic of your application already assumes that you have the data in an array, and your program is already working well, trying Tie::File doesn't cost much, because you don't have to change a lot. Instead of opening and reading the file, you would use@DNA= <DNAFILE>
In any case, have a look at the mode option.tie @DNA, 'Tie::File', "your_filename_goes_here", OPTIONS_GO_HERE or d +ie "Can not tie file ($!)";
In reply to Re: Seeking help for using Tie : : File in my perl program for counting bases using Active Perl 5.10.1 Build 1007
by rovf
in thread Seeking help for using Tie : : File in my perl program for counting bases using Active Perl 5.10.1 Build 1007
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |