in reply to passing c agruments to Perl

Why on earth do you want to write a C wrapper to check args to perl?!

Replies are listed 'Best First'.
Re: Re: passing c agruments to Perl
by koryw (Novice) on Sep 30, 2003 at 14:45 UTC
    Because of security, my Perl will be ran has root so I'm using C to put a security blanket around it. In the perl script of change to the Effective UID which is root.
      Either use the setuid function of POSIX, or else study perlvar for $< and $>, which can be used to change the real and effective UIDs in Perl itself, eliminating the need for a C wrapper.

      Even if it didn't have that built in, you could plan on using Inline::C to get access to useful C functionality directly in Perl.

      Remember that Perl has had a long life as a system administration tool on *nix, so you should expect that it has features which are useful for that, you just have to look for them.