vrk has already answered your question, I just wanted to give a tip: don't use arrays of numbers to test things like this, otherwise it's hard to tell when the array in scalar context is returning the size of the array.
my @new_array = 'a'..'e'; print @new_array . "\n"; # "5" print pop(@new_array) . "\n"; # "e" print @new_array . "\n"; # "4" print @new_array , "\n"; # "abcd"
In reply to Re: arrays and dot operator
by haukex
in thread arrays and dot operator
by rkappler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |