Hello,

I am a complete beginner - no programming background.
I want to begin with Perl and I decided to by Randal's book "*Learning Perl*".
I seem to have been progressing smoothly till when I arrived at the code
below on page 65.

my @names = qw/ tom fred dan betty roy /;
my $result = &which_element_is("dan" @names);

sub which_element_is {
    my($what, @array) = @_;
    foreach (0..$#array) {
        if ($what eq $array[$_]) {
            return $_;
        }
    }
    -1;
}

The author states or seems to imply that, "... *...@array* is a copy of 
*...@names
*"! But I don't understand how and why this is so.
I am stuck.
Please, can someone help and explain to me how and why *...@array* is a copy of
*...@names?
*
Thanking you in advance.

Kind Regards,

Joe.

-- 
Isaiah 40:31 "But they that wait upon the LORD shall renew their
strength..."

Reply via email to