On 10/19/05, [EMAIL PROTECTED]
>            -ar => [EMAIL PROTECTED] ); # I wanna lose the "\" here

if there's only one array you want to pass this way and you're cool
with it always being the last thing in the arguments, you could
do something like

sub routine{
      my ($foo,$bar,$baz,$smurf,@ar); # all initialized to undef
      for(;;){
            my $key = shift;
            my $val = shift;
            do{ $foo = $val; next} if $key eq 'foo';
            do{ $bar = $val; next } if $key eq 'bar';
            do{ $baz = $val; next } if $key eq 'baz';
            do{ $smurf = $val; next } if $key eq 'smurf';
            @ar = @_;
            last;
      };

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to