I'm a UK national passport holder living in Peru, do I need a Canadian visa for a 3/4 hour stop over to connect to a UK flight?
Check at the official Canadian eTA page at: http://www.cic.gc.ca/english/visit/eta.asp whether you need a visa and how to apply through eTA. All foreigner travelers either need a visa or need to apply through eTA as a visa-exempt foreign national. Exceptions include U.S. citizens, and travellers with a valid Canadian visa. Until fall 2016 you can board your flight without filling the eTA, but it takes just a couple of minutes to fill it, and you get an answer within minutes too. So, why not do it?
Notice that being British does not imply automatically that you do not need a visa.
Canada doesn't do "sterile transit". So if you have a stopover there you will need to enter the country.
If you are a British Citizen then you can normally enter Canada without a visa. However Canada are in the process of introducing an eTA system (similar to the US ESTA system). From what I can see online they are currently in a "leniency period" where you are supposed to get an eTA but it is not strictly enforced. As with the US ESTA the Canadian eTA is not a visa per-se but it is something you need to get in advance before travelling if you are arriving by air.
If you have one of the more unusual types of British nationality then go look things up yourself on http://www.cic.gc.ca/english/visit/visas.asp some types require a visa.