in reply to calculate all the data

$nums = '23 34 45 33'; $sum += $_ for split ' ', $nums;

Please, take a look at perldoc perlop