in reply to Re: permissions
in thread permissions

Just use the regular stat function.

From perldoc -f stat

-----------------------------
Because the mode contains both the file type and its permissions, you should mask off the file type portion and (s)printf using a C<"%o"> if you want to see the real permissions.

$mode = (stat($filename))[2]; printf "Permissions are %04o\n", $mode & 07777;
-----------------------------

-Blake

Replies are listed 'Best First'.
Re: Re: Re: permissions
by thatguy (Parson) on Jul 14, 2001 at 05:51 UTC
    Excellent! that did just what I wanted. Thanks!

    Why is it that I everything I do in perl must be so long? heh.