Pena has been sidelined since undergoing surgery on his left knee in early April and missed the first 75 games of the season. He batted .192 during a 14-game injury rehab stint.
Pena, 34, has a .260 career batting average with 23 homers over 11 previous major-league season. He has also played for the Atlanta Braves (2005-08), Kansas City Royals (2009-12), Detroit Tigers (2013) and Cincinnati Reds (2014-15).
Fryer, 30, batted .368 with five RBIs in 38 at-bats for the Cardinals.