1 May
2008
1 May
'08
07:51
On Thursday 2008-05-01 08:52, David C. Rankin wrote:
Quick perl question - why are @array[$num] and $array[$num] the same?
They are not. As per the perl manual or so, $ denotes the singular form, and @ the plural form. Like, $apple but @apples. IOW, $a[2] to extract one element, and @a[2,3,4] to extract three (same with hashes: $a{onething}, @a{one,another}). Of course, @a[2] should be valid just in case the list passed in has only one element. (Allows you to write something like @a[&all_interesting_indexes($of_this_array)] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org