J
jaw56856
OK this should be simple, but....
I am parsing an error file greping for a cretin conditions, this part I
have working fine
While(<error_file>)
{
if (/...what ever it is I am looking for.../)
print output $_
}
That is working fine.
I then log the last runtime (from the error file line item time stamp),
and this too works fine
So the next time I can pick up where we left off and not revisit the
same errors
$last_runtime = $logfile[$#logfile];
What I would like to do is search the error_file from the $last_runtime
on
But I just can't get the strings to match!
What I was trying is this
$x = 1;
while (<error_file > ){
if ($x)
{
$comp_string = substr($_, 0, 20);
if(($last_runtime eq $comp_string) )
{ $x = 0;print ("this is where i left off\n")}
print ($comp_string, "\n");
}
else
{
print (" found the starting point\n");
if (/...what ever it is I am looking for.../)
{
print $_;
print ("error found");
}
}
so what is wrong with the if(($last_runtime eq $comp_string) )
statement???
It never matches??
I am parsing an error file greping for a cretin conditions, this part I
have working fine
While(<error_file>)
{
if (/...what ever it is I am looking for.../)
print output $_
}
That is working fine.
I then log the last runtime (from the error file line item time stamp),
and this too works fine
So the next time I can pick up where we left off and not revisit the
same errors
$last_runtime = $logfile[$#logfile];
What I would like to do is search the error_file from the $last_runtime
on
But I just can't get the strings to match!
What I was trying is this
$x = 1;
while (<error_file > ){
if ($x)
{
$comp_string = substr($_, 0, 20);
if(($last_runtime eq $comp_string) )
{ $x = 0;print ("this is where i left off\n")}
print ($comp_string, "\n");
}
else
{
print (" found the starting point\n");
if (/...what ever it is I am looking for.../)
{
print $_;
print ("error found");
}
}
so what is wrong with the if(($last_runtime eq $comp_string) )
statement???
It never matches??