We help IT Professionals succeed at work.

newbie needs help

Luxana
Luxana asked
on
Medium Priority
249 Views
Last Modified: 2010-03-04
Hello experts,

I just start with perl language few days ago.  I need to know what does the & symbol means in the folowing script:

#!/usr/bin/perl
                                                                                                                             

push @array, (1,2,3)[6 & 10];
                                                                                                                             
                                                                                                                             
print @array;

------------------
result: 3

-------------------
what I know that the push function pushes the values of list onto the end of array.  ANd number in square bracets point to list index .   Can somebody give me a hint.

thanks

luxana
Comment
Watch Question

Perl programmer, author and trainer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Dave ,

I got it:))) You have no idea how many things I tried. Perfect so now I can move on:)))

Thanks for your help Dave

LUXANA

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.