in reply to Re: Re: Re: File permission converter
in thread File permission converter

The above snippet by chipmunk would have been the preferred way of writing the code. I do believe in reuse ... but you have to know the code is available before you can reuse it. I would think most people would agree that your statement does sound like you are accusing me of plagiarizing. Please word your posts more carefully in the future. Apologies for accusing you of accusing 8) .. but you have to agree it did sound that way.
  • Comment on Re: Re: Re: Re: File permission converter

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: File permission converter
by merlyn (Sage) on Feb 15, 2001 at 07:11 UTC
    Hmm. I spoke far too soon. find2perl's code is about going from the permission to the symbolic meaning. The code at the head of this thread is to go the other way, albeit for the wrong reason (from what I can gather).

    So, the code is neither the best way to do something, nor something that is parallel to what find2perl does.

    -- Randal L. Schwartz, Perl hacker

      While working on the parser that uses that permissions converter.. I was reminded of the reason I used the above method to parse the permissions. The file I am trying to obtain permissions for resides on a remote server which does not have Perl. I use Expect to SSH into the remote system and retrieve the output from a long listing on the file. Since the file does not reside on the local system I cannot use stat() on the file.