more useful options | |
PerlMonks |
Validate before printing to logfileby lakeTrout (Scribe) |
on Nov 28, 2007 at 22:41 UTC ( [id://653696]=perlquestion: print w/replies, xml ) | Need Help?? |
lakeTrout has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks, I have my hands on some OLD perl and have a question. It's a CGI that spits out a report from a flat file. Everything was put in this flat file via brute force, like so: print LOGFILE ("$FORM{filedNameFoo}\t"); That's just great for single entries like textboxes, but I have a few instances of checkboxes and I want to add a comma between them if they are true. I tried the following: ("$FORM{filedNameFoo},\t"); But when it's printed using this:
Of course I would get results like: foo,,,bar,,raz, etc -- can anyone help me with where/how to put a conditional to only print the comma if true? I've been away from the perl game for a long time, so please bare with me. Thanks! LakeTrout
Back to
Seekers of Perl Wisdom
|
|