Just a quick question!
Is there a shorthand way to assign multiple array elements (from the same array) to new variables? Ordinarily I would use:
my ($var1, $var2, $var3, $var4) = ($ar[0],$ar[1],$ar[4],$ar[7])However it would be nicer if this could be done where the array handle only has to be specified once e.g:
$ar[0,1,4,7](which does not appear to populate the variables)
In reply to Assign multiple array elements to new variables by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |