Harry Putnam <[EMAIL PROTECTED]> wrote:
: 
: I'm using a next LABEL inside a File::Find
: sub wanted {...} loop
: 
: It is further buried in a while loop inside the
: `sub wanted()'
: 
: The while loop is while (<FILE>) on the most recent
: found file.  I want this `next LABEL' to bring on a
: new file... not a new line in while loop.
: 
: So using the `next LABEL' technique how do I
: designate the wanted() subroutine as target?
: Something like this:
: 
: sub LABEL: wanted {

    I haven't tested it, but I would think this would fail.

:   open(FILE,"<File::Find::name");
:   while (<FILE>){
:     if(something) {
:         then do something
:     }else{
:        next LABEL;
:     }
:   }
: }

    As I understand this, you want to immediately open
a new file found in current file with the current while
loop. Is that correct?

    First, we need to know a few things.

    Are you wanting to recursively call the entire
wanted() subroutine?

    Or do you just want to call the while loop portion
only and continue with the execution after?

    Is it alright to clobber the currently open file or
do we need to continue processing it afterward?

    Is there any test needed to be certain we are not
opening the same file again?


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to