Re: [MacPerl] Perl Scope problem - Mailing list pgsql-general

From hciR nellA
Subject Re: [MacPerl] Perl Scope problem
Date
Msg-id 200105030357.TAA05885@alaska.net
Whole thread Raw
In response to Perl Scope problem  (Randall Perry <rgp@systame.com>)
List 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@alaska.net
Made with a Mac!

pgsql-general by date:

Previous
From: "Witold Rak"
Date:
Subject: How tnaslate kode from MySQL to Postgres?
Next
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: Problems w. SERIAL