http://www.perlmonks.org?node_id=996057


in reply to Joining Two Elements of an Array. Little Help Please.

Use strict (Tip #1 from the Basic debugging checklist)

Global symbol "@listofItems" requires explicit package name at

@listOfItems is different from @listofItems (lower-case "o"). Try:

push( my @array1, $listOfItems[0] ); push( my @array2, $listOfItems[1] ); push( my @array3, $listOfItems[2] );