Jack,
When using the perforated pipe the holes go to the side not top or bottom. This makes a gutter for the water to travel in. You need to lay a coarse stone bed first. Then the pipe is laid on the stone, holes 90* to plumb. The pipe is then wrapped with landscape fabric. Coarse stone is then filled over the pipe. You then go to a finer stone and fill over the stone. What this does is filters out the dirt and debri to keep your piping clear and running free.