Note: forwarded message attached.


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--- Begin Message ---
Tim -- Thanks for your rejoinder.

Mostly, I do use 'aliased' variables within nested
loops. However, this question came up in my mind
serendipitiously when I was working on one such
instance, without aliasing.

I just wanted to run by the Perl cognoscenti to make
sure that the answer to my question was in the
negative. The question was purely academic in its
interest (that is why, I had wantonly mentioned
"without using aliasing"). Thanks, once again!!!

Cheers,
Rex


--- Timothy Johnson <[EMAIL PROTECTED]> wrote:
> 
> You can't, exactly.  You have just overwritten $_
> with the second loop.  The
> only way you COULD do this is maybe by declaring $_
> with local() somehow?  I
> don't know.  Even if you could figure out how to do
> that, however, you would
> be doing the same thing as creating a new variable,
> only you will be making
> it a lot more complicated than it has to be.  If I
> were you (which,
> understandably, I am not), I would stick with:
> 
> for(1..10){
>   print $_\n\t";
>     foreach my $inner(a..h){
>       print "$inner\t";
>     }
>   print "\n";
> }
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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

Reply via email to