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 (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 having an uproarious good time at the Monastery: (6)
As of 2014-11-27 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (190 votes), past polls