You hardcode your pathnames. Do you have directory /home/hampton1/data in the target server? Putting $! in die statement could tell you right away.
in reply to specifying path to files
open(SDATA,"$sdata")|| die("Could not open file: $!\n");
would be sufficient instead of
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).
if (-e "/home/hampton1/data/student_count.dat")
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!