As long as we're on the topic, what's the story on efficiency between using 
an array and an array ref.  Ex:

sub PassAnEntireArray(@)
         {
         my(@array) = @_;
         ...do some stuff...
         }

sub PassAnArrayRef($)
         {
         my($ar) = @_;
         ... do some stuff...
         }

I assume passing array refs (and hash refs for that matter) would be faster 
and more efficient -- does anyone have any definitive answer?

At 14:04 18.05.2001 -0400, you wrote:

>Edson Manners wrote:
>: I'm currently copying two 1-dimensional arrays using
>: for loops. Is there an easier way as this may tag my
>: cpu due to the huge numbers I am using.
>
>@copyOfArray = @array;
>
>is the usual way to copy arrays. Question., though: Is it absolutely
>necessary to copy the arrays for what you're doing? If they're large,
>this might be worth thinking about.
>
>-- tdk

Aaron Craig
Programming
iSoftitler.com

Reply via email to