This is why you should use warnings and strict in your code. With warnings turned on you should get next warning:
Useless use of array element in void context at ./file_change_mode.pl line 12.Reason why this is happening you can see in perlfunc.
You could write:chmod(($mode | S_IXOTH), $ARGV[0]);
In reply to Re^2: check if file is executable by user/group/world?
by XooR
in thread check if file is executable by user/group/world?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |