You have a precedence error. Your code should be: if( ( -A $file || 0 ) > 30 ) { || is a logical operator so it binds less tightly than comparison operators because you usually use it like: if( -A $file > 30 || -M $file > 60 ) { and precedence is designed so that most common usages don't require parens (except for the bitwise operators which inheritted their broken precedence from C).
- tye (but my friends call me "Tye")In reply to (tye)Re: File Attributes in Win32
by tye
in thread File Attributes in Win32
by azatoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |