Thank you for the help.I've been trying to use a script that uses the
map function in the following manner
my $var = chr(13); for the control character ^M
my @mapped = map{
s/$var//g;
s/"//g;
$_;
}@contents;
What I'd really like to do though is to be able to write back(append)
to the same file.I am confused about opening a file in the append mode.
This essentially will serve as a clean up script to files that have any
of the
above.
Thanks in advance.
>
If the input file is not large, you can gobble the entire contents and
slurp
it into an array as this:
my(@contents) = <INP>;
Now you can do whatever regex substitution you need on @contents and
then
you can save it back to a new file, or truncate the old file and write
the
new modified contents into the old file.
--
Shalini Raghavan
Center for Computational Genomics and Bioinformatics
University of Minnesota
ph : 612 - 624 - 9135 e-mail : [EMAIL PROTECTED]