Mar 19, 2010, 10:00 PM
Post #6 of 7
Well, let's see. You're missing an opening parenthesis for the when(). Next, look at all your previous posts and determine where the filename goes in relation to the file test. Does the filename go on the left of the file test?
Re: [zapa99] printing rwx files
[In reply to]
At this point, your programming is incredibly sloppy. Computer programming does not allow sloppy work. You must precisely write every statement. Computer programming is not like creative writing.
When you write a line that you think should work, look at a previous program you wrote that uses the same type of line and that works, or look at an example in a book. Then determine what is different about the line that won't work and the line that did work.
On the other hand, if you are dyslexic you have no shot at ever learning how to write computer programs.
Ok almost got it. So now I add the line:This is the way it works: you do a file test on a filename, or a variable that has been assigned a filename, like $_. Then any other file tests can be performed on _ to speed things up. It's simple and easy, but if that is too confusing for you, forget you ever read about _. At this point, you have much greater concerns to worry about than making your programs more efficient--like getting them to run at all.
Lastly, search google for 'code tags'. Read the first 10 hits, then come back and post what you have learned.
(This post was edited by 7stud on Mar 19, 2010, 10:17 PM)