Re: write array refs shorter?

2002-07-03 Thread drieux
On Wednesday, July 3, 2002, at 01:13 , John W. Krahn wrote: points to all for answering the OP's specific question >> sub eatArrays >> { >> my @array1 = @{$_[0]}; >> my @array2 = @{$_[1]}; >> >> ..blah.. >> } I guess my problem here is why are we worrying about the

Re: write array refs shorter?

2002-07-03 Thread John W. Krahn
Michael Rauh wrote: > > hi, Hello, > is there a shorter way to write this: > > sub eatArrays > { > my @array1 = @{$_[0]}; > my @array2 = @{$_[1]}; > > ..blah.. > } John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: write array refs shorter?

2002-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Michael Rauh said: >that's ok, but is it possible to put especially the > >my $arrayRef1 = shift; >my @array1 = @$arrayRef1; > >into one expression? my @array1 = @{ shift() }; my @array1 = @{ +shift }; my @array1 = @{ shift @_ }; But not my @array1 = @{ shift }; -- Jeff "

Re: write array refs shorter?

2002-07-03 Thread Felix Geerinckx
on Wed, 03 Jul 2002 09:51:37 GMT, Michael Rauh wrote: > that's ok, but is it possible to put especially the > > my $arrayRef1 = shift; > my @array1 = @$arrayRef1; > > into one expression? my @array1 = @{+shift}; or my @array1 = @{shift()}; -- felix -- To unsubscribe, e-mail: [EM

Re: write array refs shorter?

2002-07-03 Thread Michael Rauh
[EMAIL PROTECTED] schrieb: > > my ($arrayRef1, $arrayRef2) = @_; > that's ok, but is it possible to put especially the my $arrayRef1 = shift; my @array1 = @$arrayRef1; into one expression? greetings michael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: write array refs shorter?

2002-07-03 Thread Janek Schleicher
Michael Rauh wrote at Wed, 03 Jul 2002 11:07:42 +0200: > is there a shorter way to write this: > > sub eatArrays > { > my $arrayRef1 = shift; > my $arrayRef2 = shift; my ($arrayRef1, $arrayRef2) = @_; :-) Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: write array refs shorter?

2002-07-03 Thread Michael Rauh
> my @array1 = @$attRef1; > my @array2 = @$attRef2; -^^^ "attRef" should of course read "arrayRef". -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

write array refs shorter?

2002-07-03 Thread Michael Rauh
hi, is there a shorter way to write this: sub eatArrays { my $arrayRef1 = shift; my $arrayRef2 = shift; my @array1 = @$attRef1; my @array2 = @$attRef2; ..blah.. } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P