I am very new to PERL. I need to modify some existing code:
unless(open (OVERAPPOINTMENTFIL, ">>$fileName"))
{
&LogMsg ("E","Can\'t open file $fileName.");
return $FALSE;
}
unless (printf OVERAPPOINTMENTFIL (
$overappointmentfil{tin},
$overappointmentfil{state},
$overappointmentfil{company_cd},
$overappointmentfil{appt_dt},
$overappointmentfil{created_dt},
$overappointmentfil{created_userid},
$overappointmentfil{last_updated_dt},
$overappointmentfil{last_updated_userid}
))
{
&LogMsg ("E","Can\'t write to file $fileName.");
return $FALSE;
}
I want to put an end of file condition but when I use it after the last } I get an error message. Here is the statement I am using:
if (eof($overappointmentfil)) {
print "END OF FILE";
}
Can anyone tell me what I am doing wrong?
Thanks,
Mark
unless(open (OVERAPPOINTMENTFIL, ">>$fileName"))
{
&LogMsg ("E","Can\'t open file $fileName.");
return $FALSE;
}
unless (printf OVERAPPOINTMENTFIL (
$overappointmentfil{tin},
$overappointmentfil{state},
$overappointmentfil{company_cd},
$overappointmentfil{appt_dt},
$overappointmentfil{created_dt},
$overappointmentfil{created_userid},
$overappointmentfil{last_updated_dt},
$overappointmentfil{last_updated_userid}
))
{
&LogMsg ("E","Can\'t write to file $fileName.");
return $FALSE;
}
I want to put an end of file condition but when I use it after the last } I get an error message. Here is the statement I am using:
if (eof($overappointmentfil)) {
print "END OF FILE";
}
Can anyone tell me what I am doing wrong?
Thanks,
Mark