develooper Front page | perl.beginners | Postings from June 2011

Re: Using $variable outside a foreach loop

Thread Previous | Thread Next
From:
Shawn H Corey
Date:
June 3, 2011 13:38
Subject:
Re: Using $variable outside a foreach loop
Message ID:
4DE94633.7060603@gmail.com
On 11-06-03 03:58 PM, sono-io@fannullone.us wrote:
> I wasn't very clear in what I wanted.  Sorry.  I wanted to use the value of $name in another loop but after testing

That implies something is wrong with your logic.  The question is:  what 
value of $name do you want?  The first?  The last?  Either you want the 
second loop nested in the first, or you want a completely independent 
one that iterates through all the values.


-- 
Just my 0.00000002 million dollars worth,
   Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About