After searching for hours and trying every possible suggestion on the forum (tho none of them addressed my issue directly) - I surrender!!! I need help.
Here is my dilemma...
I have an address book sort of db going (with a lot of additional user info) and I want to print out a very simple list like so:
UserName (user spouse)
Street
City, State ZIP
<blank line>
next record
Problem is - I have several entries that do not have a street address entered - which is okay, but I don't want those records listed for this function.
So ... here's what I'm trying to do:
Read all the records
If the STREET is blank - skip this rec
Otherwise, print
UserName (IF there is a spouse listed, print it - ELSE leave this part blank)
Street
City State Zip
I hope I'm not being too confusing here??
Here's what I have - which works beautifully ... BUT it causes a line feed for every rec that has been "left blank" as a result of NO STREET field entry.
if ($rec{'STREET'} ne "" && $rec{'SE'} ne "") {
print qq|<td>$rec{'USER'} ($rec{'SE'})
$rec{'STREET'}
$rec{'CSZ'}
</td>|;
if ($rec{'STREET'} ne "" && $rec{'SE'} eq "") {
print qq|<td>$rec{'USER'}
$rec{'STREET'}
$rec{'CSZ'
</td>|;
}
Any help would be greatly appreciated!
keien
Here is my dilemma...
I have an address book sort of db going (with a lot of additional user info) and I want to print out a very simple list like so:
UserName (user spouse)
Street
City, State ZIP
<blank line>
next record
Problem is - I have several entries that do not have a street address entered - which is okay, but I don't want those records listed for this function.
So ... here's what I'm trying to do:
Read all the records
If the STREET is blank - skip this rec
Otherwise, print
UserName (IF there is a spouse listed, print it - ELSE leave this part blank)
Street
City State Zip
I hope I'm not being too confusing here??
Here's what I have - which works beautifully ... BUT it causes a line feed for every rec that has been "left blank" as a result of NO STREET field entry.
if ($rec{'STREET'} ne "" && $rec{'SE'} ne "") {
print qq|<td>$rec{'USER'} ($rec{'SE'})
$rec{'STREET'}
$rec{'CSZ'}
</td>|;
if ($rec{'STREET'} ne "" && $rec{'SE'} eq "") {
print qq|<td>$rec{'USER'}
$rec{'STREET'}
$rec{'CSZ'
</td>|;
}
Any help would be greatly appreciated!
keien