Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

"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 ?

Replies are listed 'Best First'.
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,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://280452]
Approved by belg4mit
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-06-22 12:13 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.