think this will work ...

use strict;
my ($cust_data) = {};
my ($condition, $condition2);

while ($condition) {
     #...

     $cust_data = get_cust_data();

     if ($condition2) {
         if (send_mail($cust_data)) {
         print $cust_data->{'customer'};
        # ...
        }

     }
     else {

         if (send_mail($cust_data)) {
         print $cust_data->{'customer'};
                #...

                }
         }
}

> use strict;
> $cust_data = {};
>
> while ($condition) {
>     ...
>
>     $cust_data = get_cust_data();
>
>     if ($condition2) {
>         if (send_mail($cust_data)) {
>         print $cust_data->{'customer'};
>        ...
>
>     }
>     else {
>
>         if (send_mail($cust_data)) {
>         print $cust_data->{'customer'};
>         ...
>
>         }
> }
- hcir
mailto:[EMAIL PROTECTED]
Made with a Mac!

Reply via email to