I want to tweak a small program I'm creating. It will read a directory and if it finds a file inside the directory with an executable it should do something.
I just pasted here the section that matters to the program where I'm trying to detect if its executable.
Thanks for the assistance.
while (my $name = readdir DIR) {
next if $name =~ /^\./;
if (-x $name)
{
#do something
}
}
I just pasted here the section that matters to the program where I'm trying to detect if its executable.
Thanks for the assistance.
while (my $name = readdir DIR) {
next if $name =~ /^\./;
if (-x $name)
{
#do something
}
}