Hi All
I am using the routine below to check whether the contents of the file contain '1'.
But I think there is a logic error somewhere can anyone see it?
{
$virgin = "$user";
$virgin .= "virgin.counter";
open(VIRGIN, "$datadir/$virgin") or die "can't open file: n";
$data = (
);
close (VIRGIN);
if ($data eq '1') {
$aud = "$user";
$aud .= "audience.counter";
open(AUD, "$datadir/$aud") or die "can't open file: n";
$data2 = ( );
close (AUD);
if ($data2 eq '1') {
open (PER_VIRGIN, "$per_virgin") || &open_error($per_virgin);
while ( )
{
$item_number = "$_";
}
close (PER_VIRGIN);
$item_number += 1;
open (PER_VIRGIN, ">$per_virgin") || &open_error($per_virgin);
print PER_VIRGIN "$item_numbern";
close (PER_VIRGIN);
}
}
Thanks
Mark