Possibly why your script is exiting is because you have an "...|| die"
command at the "Do something like..." command.
I can't tell what statement the script you supplied is dying on since you
have only supplied it in pseudo-code form, but my advice would be to try
and work out what line of code it is that is dying and why, (the $!
variable might help you here. Try something like "...|| die "Fatal error:
$!\n";"
The die command will exit your script when called, which is why your loops
do not continue. If you would prefer something less invasive than die,
might I suggest warn instead: "... || warn "Error: $!";". This will not
terminate your script, instead it will write the error to STDERR and
continue.
HTH,
Philip Morley.
Blip Sid <[EMAIL PROTECTED]>
Sent by: To:
[EMAIL PROTECTED]
[EMAIL PROTECTED] cc:
veState.com Subject: Algorithm
question
20/05/02 14:00
I wrote a script that basically does the following.
foreach variable in an array A{
foreach variable in array B {
Do something like issuing a system command and
compare variable A to the output|| die
}
}
The problem is that if the Do something part fails,
the script exits altogether without proceeding to the
next array variable B and A.
How can I fix it?
I didn't think Next, Redo will help.
Any suggestions appreciated.
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs