Hello GSperlbio,
Yet another option is to use the core Tie::File module:
#! perl use strict; use warnings; use Tie::File; my $data = 'uuu.txt'; tie my @lines, 'Tie::File', $data or die "Cannot tie file '$data': $!"; s{[^ACGT]}{}g for @lines; untie @lines;
But note that this will not remove newlines.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Removing white space from the file
by Athanasius
in thread Removing white space from the file
by GSperlbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |