Michael Rauh wrote: > > how can one define default parameters for subroutines? > > something like: > sub mysub($a, $b=5) > {}
No. > or do i have to do a check like this after entering the sub: > sub mysub > { > ($a, $b) = @_; > if (!$b) {$b=5;} > } Yes, or: sub mysub { my $a = shift; my $b = shift || 5; } John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]