push @array, "$i:$j:$value"; ## to print: foreach (@array) { print join (' ', split ":"); }