| From: | hciR nellA <g3pb(at)alaska(dot)net> | 
|---|---|
| To: | Randall Perry <rgp(at)systame(dot)com> | 
| Cc: | <pgsql-general(at)postgresql(dot)org>, <macperl(at)perl(dot)org> | 
| Subject: | Re: [MacPerl] Perl Scope problem | 
| Date: | 2001-05-03 03:55:13 | 
| Message-ID: | 200105030357.TAA05885@alaska.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
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:g3pb(at)alaska(dot)net
Made with a Mac!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Justin Clift | 2001-05-03 07:03:11 | Daylight savings | 
| Previous Message | Randall Perry | 2001-05-03 03:27:28 | Perl Scope problem |