Falkirk will face Dundee in the second round of the Ramsdens Cup.
The match is one of three all-First Division ties: Hamilton take on Partick Thistle, while Ayr face Raith Rovers.
After an 8-0 victory over Stranraer in the first round, Morton face an away trip to Forfar, while Livingston take on Stirling Albion at Almondvale.
Second Division sides East Fife and Dumbarton both received home ties, against Elgin City and Berwick Rangers respectively.
A long journey lies ahead for Peterhead, who travel to face Annan Athletic, 250 miles away.
RAMSDENS CUP SECOND ROUND DRAW
Hamilton Academical v Partick Thistle
Falkirk v Dundee
East Fife v Elgin City
Livingston v Stirling Albion
Annan Athletic v Peterhead
Forfar Athletic v Morton
Dumbarton v Berwick Rangers
Ayr United v Raith Rovers