I may have found an answer to my previous question... theres just one thing I need to know in order for it to work...
if you have in a perl script...
<<CODE HERE>>
while 1 = 1 { #just to show the loop continues
&somesubhere;
<<MORE CODE>>
}
sub somethinghere{
<<BUNCH OF IF STATEMENTS>>
if (1 eq 5){ #if statement that comes out false..
???????
}
}
is there a way to exit JUST the subroutine in place of "??????"?... I need it to exit ONLY the subroutine "somethinghere" and go on with the while loop which would then open the subroutine "somethinghere" with another file....
I tried using exit; but I forgot this will end the script so it doesnt do any more...
What it does, is goes through one file (flatfile database), applies the if then statements (filters) to that database, and if it passes all if statements, it displays it.. if not it should not display that one that doesnt match then go on with the rest...
but what it does, is display records that match the filters, but when it hits one that doesnt it completely stops and doesnt go on to the rest that match (because of the "exit;"
what I want to do is use something like exit; but so it exits that subroutine ONLY, not the entire script
if you have in a perl script...
<<CODE HERE>>
while 1 = 1 { #just to show the loop continues
&somesubhere;
<<MORE CODE>>
}
sub somethinghere{
<<BUNCH OF IF STATEMENTS>>
if (1 eq 5){ #if statement that comes out false..
???????
}
}
is there a way to exit JUST the subroutine in place of "??????"?... I need it to exit ONLY the subroutine "somethinghere" and go on with the while loop which would then open the subroutine "somethinghere" with another file....
I tried using exit; but I forgot this will end the script so it doesnt do any more...
What it does, is goes through one file (flatfile database), applies the if then statements (filters) to that database, and if it passes all if statements, it displays it.. if not it should not display that one that doesnt match then go on with the rest...
but what it does, is display records that match the filters, but when it hits one that doesnt it completely stops and doesnt go on to the rest that match (because of the "exit;"