Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

"missing" perl routines

by kschwab (Priest)
on Aug 03, 2003 at 16:19 UTC ( #280452=perlquestion: print w/ replies, xml ) Need Help??
kschwab has asked for the wisdom of the Perl Monks concerning the following question:

Over time, I've happened upon two common unix routines that are missing in Perl. The two I've run into are setgroups() and lchmod().

Am I just not looking in the right spot ? Also, are there any other common routines other folks have noticed missing ?

Comment on "missing" perl routines
Re: "missing" perl routines
by belg4mit (Prior) on Aug 03, 2003 at 16:25 UTC
    For setgroups see GID in perlvar. If lchmod (UPDATE: yup) is what I think it is it's nearly pointless no? The permissions on the destination conrtol acccess.

    --
    I'm not belgian but I play one on TV.

      As for lchmod, yes, I see your point. But what if I were trying to rewrite something like tar ? It wouldn't matter a lot, but it wouldn't work just like the C implementation.
        Then you would write a module in C to implement lchmod, and use it in your program.
•Re: "missing" perl routines
by merlyn (Sage) on Aug 03, 2003 at 20:56 UTC
Re: "missing" perl routines
by bobn (Chaplain) on Aug 03, 2003 at 22:53 UTC

    chmod $mode, $file unless -l $file;

    --Bob Niederman, http://bob-n.com

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://280452]
Approved by belg4mit
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-25 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls