Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^5: Strictly frustrating !

by derby (Abbot)
on Jul 26, 2013 at 17:41 UTC ( [id://1046572] : note . print w/replies, xml ) Need Help??

in reply to Re^4: Strictly frustrating !
in thread Strictly frustrating !

In addition to declaring your variables with my (as others have pointed out), you're not properly de-referencing your array or hash references. This

foreach my $k (keys %{hash}) {
should be
foreach my $k (keys %{$hash}) {
(and same for de-referencing the array reference in doArrayTidy).