pl script printing blank lines

wxdqz

New Member
Hi. I have a script that takes values from a form and emails them to a specific user. Works fine, but when I view the email output I see that when an item is not checked it prints a blank space in it's place. So there could be several blank lines between selected items. Looking at the script I see why it does this, but figured there must be a way to NOT print a blank line when an object is not selected. Here's a portion of the code i have:

$PP_ck1 = $in{'PP_ck1'};
$PP_ck2 = $in{'PP_ck2'};
$PP_ck3 = $in{'PP_ck3'};
$PP_ck4 = $in{'PP_ck4'};
$PP_ck5 = $in{'PP_ck5'};

print MAIL "PRODUCT PAGES\n";
print MAIL "$PP_ck1\n";
print MAIL "$PP_ck2\n";
print MAIL "$PP_ck3\n";
print MAIL "$PP_ck4\n";
print MAIL "$PP_ck5\n";
print MAIL "---------------------------------\n";

Thanks in advance for any observations.
 
Top