Rails/Boxes are easier to learn and easier to pretend you are good at - a person with less than a week's worth of riding can probably 50-50 a ride-on box. The thing is that a lot of what you do on a rail/box requires a skill set that is completely unrelated to using your board on the snow (i.e. unlike on snow, you never want to use your edges).
The pipe requires good balance and good edge control (i.e. the skill you pick up from being a good rider on the snow). Until you actually show proficiency at riding, you will look like an idiot. My guess is that you probably won't be able to ride pipe properly until you can ride black diamond groomers runs with confidence (because you have to treat each wall as essentially a very steep slope).
I would say pipe is safer... if you screw up, the curve of the wall acts like a slide. True, you can push too hard off the wall and land in the flat that can suck... but that only is an issue when you are clearing the wall of the pipe by a couple of feet... and let's be realistic, you are not going to get good enough for that to happen any time soon (if ever).
In comparison, there are many many ways to break bones messing up a rail (running into it, slipping out and landing on it, having you board go under it).
I say try both and see what is more fun for you. I personally like pipe more.
I've been throught the pipe a few times and if you're scooting back and forth and not getting air then it's very safe and pretty easy, and soft falls, while I've yet to get the guts to try to get on a rail; the thought of falling on something made of metal seems like an easy way to get hurt myself.