# Say this code snippet is being executed by a web server, and the
# user has entered a value for the $userName field into a web page.
# Add user to guestbook log
# (dangerous version)
$sysCommand = "AddGuest $userName";
if ( system($sysCommand) != 0 ){
die "Unable to add user $!";
}
# Add user to guestbook log
# (safer version)
if ( system("AddGuest", $userName) != 0 ){
die "Unable to add user $!";
}