Array as function parameter

"Stanislaw Romanski" <[email protected]> Tue, 7 Jun 2011 01:46:44 +0200
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <F41C42C8E50C46DFB4F973F81080A9D9@datos57604fe5b>
Hi,

Is it possible to write a function having an aarray (not: a reference to array)
as a parameter ?

------------------------------------------------------------------------------

For example, the first parameter of splice function is an array.

         my @taborig = ( qw( e0 e1 e2 e3 e4 e5 e6 ) );
         my @rslt = splice( @taborig, 2, 3);
         print Dumper(\@rslt);   # e2 e3 e4

         @taborig = ( qw( e0 e1 e2 e3 e4 e5 e6 ) );
         @rslt = splice( @taborig, 2);
         print Dumper(\@rslt);   # e2 e3 e4 e5 e6 

Can I write a function 'my_splice' acting the same way ?

Cheers,

Stanisław Romański

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