in reply to Print from array element to another array element

You are attempting to write C, not perl. In perl, the word 'catfood' is a string, not an array. We use built-in functions and regular expressions for processing strings. It is possible to split a string into an array of characters, but reference still cannot be mamnipulated like a C pointer.
Bill
  • Comment on Re: Print from array element to another array element