Hi all, I'm trying to figure this out, I'd appreciate any help.
I have an application that I am using a perl script to do pattern matching
and then execute commands specific to that application. I need a way to
handle an error in my script if one of the `cmd blah`; doesn't work and send
it to an error subroutine.
Here's what I have now:
<SNIPPED>
sub subscription
{
($passed_ep,$passed_pr$passed_sub,$passed_org,$passed_plat)=shift;
#add error routine to handle if PR/PM doesn't exist -pass to
exception_sub?
`wsub \@ProfileManager:Staging \@Endpoint:$passed_ep`;
`wln \@Endpoint:$passed_ep \@PolicyRegion:$passed_pr\.$passed_org`;
`wsub \@ProfileManager:$passed_sub\.$passed_org\.$passed_plat\.ep
\@Endpoint:$passed_ep`;
# on error pass ($ep,$pr,$sub,$org,$plat)
}
sub exception_sub
{
($passed_ep,$passed_pr$passed_sub,$passed_org,$passed_plat)=shift;
`wsub \@ProfileManager:Exceptions \@Endpoint:$passed_ep`;
print AFTERLOG "$passed_ep cannot go to $passed_org - Check PR
Structure\n";
}
I tried:
`wsub \@ProfileManager:Staging \@Endpoint:$passed_ep` ||
exception_sub($passed_ep);
but that didn't work.
-Paul Farley
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]