in reply to Parameter passing
I have a feeling you intended to return $rc.
If your routine is called from various places and should only die in certain instances, have the die at the outer level, but if it always enforces that special condition, you can have the die insided the routine.
I would suggest having a routine just for the test and the die; I would name it something like die_unless_value_is_x.
Update:If you really need to have references to scalar parameters, that's the idea situation for fuunction prototypes:
sub fn (\$\$) { ... } fn $x, $y;
You declare the fn() takes references to scalars, and then don't need to escape the variables when you invoke the function. Of course, poorly used, this can also lead to confusion ... Why is this variable modified in the routine?
--
TTTATCGGTCGTTATATAGATGTTTGCA
|
|---|