in reply to Re: Avoiding user-input in sub calls.
in thread Avoiding user-input in sub calls.
as:if ( exists $func{$sub} ) { $func{$sub}->($data) } else { $func{one}->($data) }
($func{$sub} || $func{one})->( $data );
which at least ensures that the same parameters are passed to (and possibly returned from ) the default routine. More compact and fewer things to worry about from a maintenance point of view!
Liz
|
|---|