The owner comes from the [tt]stat()[/tt] function, docuemtned under perlfun.
Code:
my @stat = stat($filename);
my $uid = $stat[4];
-O tells you if the script is owned by the person who logged on to run the script (real uid).
-o tells you if the script is owned by the person apparently running the script after any "su" commands, etc (effective uid).
HTH,
Yrs,
fish
"As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilkes
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.