On 10/26/02 11:55 AM, Mark Knipfer wrote:
After browsing and reading through part of the O'Rielly - Programming Perl 2nd Edition book, I came up with this routine:How do you check for root level access in Perl 5.6.0 in Mac OS X?
$login = (getpwuid($>));
if (!$login == "root")
{
die "\nYou cannot run this Perl script as user \"$login\", must be ROOT!\n\n";
}
