- or download this
sub printArray {
for my $element ( @_ ) {
...
....
my @array = (1 ,2 ,3 4, 5);
printArray( @array );
- or download this
#! perl -sw
use strict;
...
my @ary2 = ('a', 'b', 'c', 'd', 'e');
printArrays( \@ary1, \@ary2 );
- or download this
c:\test>test
Array1 element: 1
...
Array1[4] = 5
c:\test>