Learning two different ways to do everything is not easier. All you need to know is where ever you normally have the array name, replace it with {$ref} when you have a reference to an array. @array is now @{$ref}. $array[0] is now ${$ref}[0] It's that simple.