in reply to Re: Add Null values to my FlatFile
in thread Add Null values to my FlatFile

Hi, thanks for taking a look. The log file prints everything in sequence, something like this:
Head1 Head2 Head3 Head4 Head5 val1 val2 val9 val10 val1
what I want is this:
Head1 Head2 Head3 Head4 Head5 ... Head9 val1 val2 val9
where values 3-8 are null, they don't print. I'll try you suggestion and see what that gives me.

Thank you!

UPDATE:
adding: print LOGFILE "/$key/".$FORM{$key}."\n"; instead of what I have already doesn't add the fields with no value, it just prints element on a new line, like it's a new record in the flat file

Replies are listed 'Best First'.
Re^3: Add Null values to my FlatFile
by apl (Monsignor) on Nov 26, 2007 at 22:51 UTC
    I was vague; my apologies. I suggested the new print as a debugging aid. It wasn't intended as a solution to the problem.

    Having seen the follow-up, I'd agree with aquarium; if the value is NULL, force it to a blank or a fixed string.