Hey ironfenix,
I've had to do that in the past for a few sites and I tackled it a little differently. Rather than using a pipe '|' I would use CSS and utilising a
border-right:1px solid #fff; substituting #fff with whatever colour you want.
You'll still get the same result with an extra one at the end so you can either use something like #menu li:last-child { border-right:0; } and that'll get rid of the last one in some browsers.
Some versions of IE don't recognise the :last-child pseudo class.
You might need to add some jQuery if you need to deal with that. Something like:
jQuery(document).ready(function($) {
jQuery("#nav li:last").css({'border-right':0});
});
Should deal with it I think :)