Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: check if file is executable by user/group/world?

by vinoth.ree (Parson)
on Aug 06, 2009 at 08:50 UTC ( #786348=note: print w/ replies, xml ) Need Help??


in reply to Re^2: check if file is executable by user/group/world?
in thread check if file is executable by user/group/world?

Sorry!Utilitarian I just given the hint, and missed something,Below the code I just tried,

use Data::Dumper; use Fcntl ':mode'; my $filename="pl_bak.pl"; my @array=lstat($filename); $permissions = sprintf "%04o", S_IMODE($array[2]); print "File permissions: $permissions\n";
Update

Removed a file type line.


Comment on Re^3: check if file is executable by user/group/world?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2014-07-28 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls