#use whateveryouwant;
my $filename = "insertfilenamehere";
open INPUT, $filename or die;
my $modify_state = "false";
my $line = "";
while ($line = )
{
chomp($line);
#look for the value
if ($line =~ /are these the droids you're looking for?/)
{
$modify_state = "true";
last;
}
}
close INPUT;
if ($modify_state eq "false")
{
open INPUT, $filename;
open OUTPUT, ">output" or die;
while ($line = )
{
#modify the line here
#and print to the output file
}
close OUTPUT;
close INPUT;
#rename the output file back to the original filename.
}