It depends on which keyboard layout you're using. On my QWERTY keyboard, I press and hold Shift and then the key on the far right of the main keyboard section below Backspace and above Enter. For many countries' QWERTZ layout it looks like AltGr + W gets you the | character.
If you're having difficulty finding this character on your keyboard, you could always explicitly call the or function. or is the function name associated with the | operator.