in reply to Unable to print the contents of an array reference passed from the main pgm to the flat file
Is argument 6 @ff? If so it looks as though it is getting clobbered when you "determine the field names".
Either unshift the field names onto @ff or perhaps just print the field names outside your for loop and leave @ff well alone.# determine the field names if ($colNamesHdl) { @ff=(); for ($i=0; $i <= $#$colNamesHdl; $i++) { push(@ff, $$colNamesHdl[$i]); } } else { $k = $$rowsHdl[0]; @ff = keys(%$k); }
update: changed shift to unshift
|
---|