`next LABEL' usage
From: Harry Putnam (reader_at_newsguy.com)
Date: 03/29/04
- Next message: Smoot Carl-Mitchell: "Re: string change problem"
- Previous message: John W. Krahn: "Re: string change problem"
- Next in thread: Charles K. Clarkson: "RE: `next LABEL' usage"
- Reply: Charles K. Clarkson: "RE: `next LABEL' usage"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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;
}
}
}
- Next message: Smoot Carl-Mitchell: "Re: string change problem"
- Previous message: John W. Krahn: "Re: string change problem"
- Next in thread: Charles K. Clarkson: "RE: `next LABEL' usage"
- Reply: Charles K. Clarkson: "RE: `next LABEL' usage"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|