`next LABEL' usage

From: Harry Putnam (reader_at_newsguy.com)
Date: 03/29/04


To: beginners@perl.org
Date: Mon, 29 Mar 2004 12:36:32 -0600


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 {
  open(FILE,"<File::Find::name");
  while (<FILE>){
    if(something) {
        then do something
    }else{
       next LABEL;
    }
  }
}



Relevant Pages

  • Re: address of a statement in C
    ... Not until you've accounted for every goto and traced ... >> every possible execution path. ... Not until you've accounted for every if and loop and traced every ... in absence of a label, you *know* that I will be initialized to 1 ...
    (comp.lang.c)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... I shall have to develop a Windows compiler myself it ... >> Because C was never designed, its for loop reinvents what its do loop, ... You must then generate the assembler label for the end of the ... Objects in this stack need to contain a type indicator. ...
    (comp.programming)
  • Re: store whole InputStream in a String
    ... > jump out of the immediate enclosing control structure, ... You can put a label prior to any ... contents of the while loop. ... > about, or particularly adept at, structured programming. ...
    (comp.lang.java.programmer)
  • RE: `next LABEL usage
    ... : I'm using a next LABEL inside a File::Find ... : sub wanted loop ... It is further buried in a while loop inside the ... designate the wantedsubroutine as target? ...
    (perl.beginners)
  • Re: Loop and addressing other controls
    ... One is to loop through the controls in frmLC and find the one you are ... Note above that this wont find controls that are within another control such ... and then for each label you are looping the controls on another ... As you can see the checkbox name corresponds with the ...
    (microsoft.public.dotnet.languages.vb)