UFC officials announced the changes on Monday.
Perez (13-4) is undefeated in the UFC, winning all three of his fights in the first round, but a leg infection has forced him off the UFC 159 fight card.
Johnny Bedford (19-9-1) is also undefeated in the UFC, winning his two fights in the promotion by way of knockout.
Caraway (17-6) accepted the fight on short notice. He is coming off a split decision loss to Takeya Mizugaki on March 3. With just five days to prepare for Bedford, Caraway hopes to rebound from the loss to Mizugaki with a win on Saturday.
UFC 159 takes place April 27 and is headlined by a light heavyweight title bout between champion Jon Jones and challenger Chael Sonnen. The Caraway vs. Bedford bout headlines the preliminary portion of the card that airs live on FX.