in reply to perl system() interactive/noninteractive question
Try specifying the full path of the command gvfs-mount command, and make sure you have all the required environment variables set in your perl script.