Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by vinoth.ree (Monsignor)
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://786348]
help
Chatterbox?
Discipulus never noticed there was subtitles... can I call them with &subtitle or is too much perl 4?
[LanX]: YT=youtube
[Discipulus]: ;=) yes i'm not SO dumb
[LanX]: SO=StackOverflow
[Discipulus]: :=(
[perldigious]: I watched some video on YT awhile back with auto-subtitle on and the speaker had a very thick cockney sort of English accent... hillarity ensued in the subtitles.
[Discipulus]: IHAA=I hate acronyms anyway

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-06-23 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (552 votes). Check out past polls.