in reply to
specifying path to files
You hardcode your pathnames. Do you have directory /home/hampton1/data in the target server? Putting $! in die statement could tell you right away.
open(SDATA,"$sdata")|| die("Could not open file: $!\n");
Also,
unlink $scnt;
would be sufficient instead of
if (-e "/home/hampton1/data/student_count.dat")
{
unlink($scnt);
}
since you already assigned
$scnt to
/home/hampton1/data/student_count.dat, unless you care about why
unlink didn't remove the file (which is another matter).
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!