You hardcode your pathnames. Do you have directory /home/hampton1/data
in the target server? Putting $!
statement could tell you right away.
open(SDATA,"$sdata")|| die("Could not open file: $!\n");
would be sufficient instead of
if (-e "/home/hampton1/data/student_count.dat")
since you already assigned $scnt
, 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!