Is there a way to access the 'foreach' variable from a subprocedure called
from inside the loop whose variable you want to access?  Hooboy, even I
don't understand that question! ;-)  An example is neccessary, I believe:

           foreach my $store( values %$server ){
                if( $$store{errorPageCount} >=1 ){
## loop through each page to check in each store
                    foreach my $page( values %$store ){
                        $$server{emailMessage} .= "$$page{error}";
                    }
                }
                if( $$store{badMailSent} ne 'sent' ){
                    mailIt( $$store{emailMessage}, "$$store{name} is
non-responsive", 'bad', $$store{email});
                }
            }

Now, from within my mailIt sub, can I access $$store or $$server?  I get the
error message: "Global symbol "$store" requires explicit package name at
D:\My Stuff\lance\perl\store_monitor\store_monitor.pl line 603."

inside of mailIt, I am trying to access a variable in %server using:
$$server{errorPageCount}++;

But I get lots of grief!



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to