in reply to Can the user a script runs as be changed?

something else you can do as far as changing the user a script is running as:
my ($login,$pass,$uid,$gid) = getpwnam('username'); $) = $gid; $> = $uid; #now it should be running as username
This probably won't be applicable in this case but its good to know as an FYI