in reply to Arrays of hashes which have arrays

Use use warnings;!!! You would have gotten at least the first of

Useless use of concatenation (.) or string in void context Use of uninitialized value in print
print .", ".$xy; ^ |

The above means

print() . ", " . $xy;

and thus

print($_) . ", " . $xy;

By the way, when dumping an array, use
print Dumper \@array;
instead of
print Dumper @array;

Update: Added warning.

Replies are listed 'Best First'.
Re^2: Arrays of hashes which have arrays
by LesleyB (Friar) on Jan 26, 2009 at 22:49 UTC

    I am using warnings .. I only posted the snippets that were causing me grief. I misinterpreted those warnings to mean I was attempting to print a variable with no value.

    Thank you very much for your help

      "Useless use in void context" is not a comment about the operands. It means the result of an operation is being discarded without being used. In this case, the result of the concatenation of the value returned by print and what follows is being discarded.

      The following would also issue the warning

      @a = 4, 5;
      because Perl interprets that as
      ( @a = 4 ), 5;

      The result of the list operator is being discarded. (I'm making the likely assumption that the above is being evaluated in void context.)