You can. Not all ouzos are identical, though.

If you were to ask the question logically (which is not really our expectation), it would be, "can you substitute ouzo for pastis?" And our answer would be, "ouzo is the name of the category of liqueur in Greece that in France is called pastis and in Spain ojen."

Pernod is one brand of pastis – perhaps the best known – and should not vary from bottle to bottle. There are any number of ouzos on the market, and there are certainly some differences among them, and some will be closer to Pernod and some further away.

All the drinks in this category are principally flavored with the essence of anise or licorice, which is added to a spirit base. Herbs are added, and may include coriander, parsley, chamomile, and others, after which, the liqueur is sweetened, brought to an alcohol content around 35%, and bottled. The combination of herbs used in one ouzo may be entirely different from that in another, and while the difference in taste may be reasonably subtle, it will be discernible.

Stuart Walton, author of The New Guide to Spirits and Liqueurs pays homage to the strength and vitality of this category of liqueur: "… a relatively small amount of pastis will have plenty to say for itself in even the most ferocious of mixes, concoctions that would drown the presence of many of the more delicate liqueurs."

Depending on the quantity and how it is used, which ouzo you use may not make much or any difference in your recipe, but now you know why.