Pharmacology

A patient was schedule for surgery. Before giving anaesthesia, he was administered glycopyrrolate. What is rationale of giving glycopyrrolate before anaesthesia?