Kevin Pfeiffer wrote:
>
> In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
>
> [orig. question clipped]
>
> >
> > The simplest way I could think of doing that would be:
> >
> > use warnings;
> > use strict;
> > use Tie::File;
> > use Fcntl ':flock';
> >
> > my $source_file = 'searchandreplac
In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
[orig. question clipped]
>
> The simplest way I could think of doing that would be:
>
> use warnings;
> use strict;
> use Tie::File;
> use Fcntl ':flock';
>
> my $source_file = 'searchandreplace.txt';
>
> my $t = tie my @data, 'Tie::File',
try this:
my $source_file = "searchandreplace.txt";
open(IN,"<$source_file") || die "can't open file: $1";
while() {
$row = $_;
$row =~ s/\s+\w+//i;
push(@arr, $row);
}
close(IN);
open(OUT,">$source_file" ) || die "can't open file: $1";
foreach (@arr) {
print O
AN wrote:
>>>Hi,
>>>Newbie here. I am writing a program that takes a file that has two columns
>>>of words, extracts the second column, then saves the original file with only
>>>the data in the first column.
>>>Question #1 - would it be better to do this w/ the split or s/// functions ?
>>>Ques
Absolut Newbie wrote:
>
> Hi,
Hello,
> Newbie here. I am writing a program that takes a file that has two columns
> of words, extracts the second column, then saves the original file with only
> the data in the first column.
>
> Question #1 - would it be better to do this w/ the split or s/// f
On Wednesday, August 20, 2003, at 08:12 AM, Absolut Newbie wrote:
Hi,
Howdy.
Newbie here. I am writing a program that takes a file that has two
columns
of words, extracts the second column, then saves the original file
with only
the data in the first column.
Question #1 - would it be better t
Hi,
Newbie here. I am writing a program that takes a file that has two columns
of words, extracts the second column, then saves the original file with only
the data in the first column.
Question #1 - would it be better to do this w/ the split or s/// functions ?
Question #1 - how do I write back