Hallo, all!

I have a function which prints array:

sub print_array {
 my $array_ref = shift;
 for(@$array_ref){
    print "$_\n";
 }
}

And I have a big array, for example named @array.
I want to print @array elements from N to N+100 using this function, but don't want to use second array (they are can be very big). After print I don't need @array anymore.


I do this:
$#array = $N+100;
print_array($array[$N]);

But I got error: [Not an ARRAY reference at ... ]
Is ARRAY reference in perl not the reference to the first element of ARRAY ?
Or is the better way to solve this problem?

Thank you!

P.S. I beg your pardon for my bad English.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to