in reply to Re: Replacing a text field in a spreadsheet
in thread Replacing a text field in a spreadsheet

I thought I was getting somewhere with this:
... open (IN, "$data") || die "Couldn't get $data page"; my @all = <IN>; close (IN); open (IN2, ">$data.tmp") || die "Couldn't open temporary file"; foreach my $line (@all) { my ($one,$two,$three,$four,$five,$six,$seven) = split "\t",$line; if ($three eq $checkthree) { ($one,$two,$three,$four,$five,$six,$seven) = @line; last; } } rename("$data.tmp", "$data") || die "Couldn't rename file"; print "okay";
As it went through and printed "okay".
Unfortunately it wiped the file so obviously my definition of "okay" is different to perl's :-)
What to do?