in reply to shifting arguments
shift only retrieves the first value from the array... so the other two would naturally be undef.
you could do:
my($reg, $ass, $check) = (shift, shift, shift); [download]