You already matched this - you can just do

my ($num, $sides, $plus) = ($1, $2, $3);