You should read the return value of `touch` which is boolean `true`/`false` for success/failure to determine the ability to touch the file. `$touched = @touch( ... );`