Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by vinoth.ree (Prior)
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 lurking in the Monastery: (15)
As of 2015-07-31 19:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls