|
#!/usr/bin/perl # use Shell qw(ps ls cp date rm); use Shell qw(ls cp date rm); print "Content-type:text/html\n\n"; print "<pre>"; # print ps("-aux"),"\n"; # ไม่ควรใช้ใน free hosting แต่ใช้ได้ print ls("-al"),"\n"; if (-f "useshell.pl") { cp("useshell.pl", "tempfile.txt"); # คัดลอกแฟ้ม ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat "tempfile.txt"; print "Copy file and Size= $size \n"; rm ("tempfile.txt"); # ลบแฟ้ม print "Remove file\n"; } else { print "useshell.pl not found\n"; } $today = date(); print $today,"\n"; |