Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone please tell me to implement the try-catch-throw method in this code.$request = "abc"; $response = "test"; sub request_response { my($request,$response) = @_; my $success; if(($request =~ /^JI/) || ($request eq "JO")) { $success = 1; $request = "1A Transmission:\n".$request; } elsif(($response eq "OK INFORMATION DELETED") || ($response =~ /DESCRI +PTION ELEMENT DOES NOT EXIST/)) { $success = 1; $response = "1A Response:\n".$response; } my $transaction = join("\n",$request,$response); print STDOUT $transaction."\n"; print STDERR $transaction unless ($success == 1); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: pls help me to implement try-catch-throws without using any exception handling
by DamnDirtyApe (Curate) on Aug 30, 2004 at 19:07 UTC | |
Re: pls help me to implement try-catch-throws without using any exception handling
by duff (Parson) on Aug 30, 2004 at 18:59 UTC | |
Re: pls help me to implement try-catch-throws without using any exception handling
by csuhockey3 (Curate) on Aug 30, 2004 at 19:35 UTC | |
by JAMBOID (Sexton) on Aug 30, 2004 at 22:52 UTC | |
by PodMaster (Abbot) on Aug 31, 2004 at 03:54 UTC |