in this block:

sub func1{
        my @array=(0,0,0);
        func2();
        print "it's not working" if ($array[1]==0);
}

Sub func2(){
        return if($array[1]==1);
        $array[1]=1 if($array[1]==0);
        func2();
}

This doesn't do nothing :) but I came across this problem in a script I wrote.
I can access @array inside func2 and modify it. Also, recursively called func2 sees 
the changed values. 
But, after returning to func1, @array is still as before.
What's wrong ?


-- 
Duarte Manuel Cordeiro 
Manager - IT - Security & Communications 
mailto:duarte.cordeiro@;neoris.com |  msn: [EMAIL PROTECTED] |  
http://www.neoris.com/ 
-- 
Neoris Portugal 
Edificio Inovação IV - Sala 819 - Taguspark * 2780-920 Oeiras * Portugal 
Tel: +351 21 423-8350  |  Fax: +351 21 421-7626  | Mob: +35191 613-5706 
-- 
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message and kindly notify the sender by reply email. Please advise 
immediately if you or your employer does not consent to Internet email for messages of 
this kind. Opinions, conclusions and other information in this message that do not 
relate to the official business of my firm shall be understood as neither given nor 
endorsed by it.

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

Reply via email to