A pinhole camera uses a small hole to allow light through to shine on a surface which has a photographic film on it to capture the image. The hole acts like a lens to focus the image. The smaller the hole, the more in focus the image. But smaller holes let through less light so the image is darker.
A periscope is an arrangement of 2 mirrors, usually one above the other, they are angled at 45 degrees so when light strikes the upper mirror it is reflected, by 90 degrees, down to the lower mirror which then reflects it 90 degrees to make it parallel with the original light source thus allowing the user to see an object from the point of view of the top mirror. This allows viewing over walls or, in a submarine, above the sea while the sub is below it
So after reading this we can understand that pinhole camera is easier.