This is implemented using the ability of Perl to have anonymous subs passed as parameters to functions, provided they have a compatible prototype2 such as sub try(&$){}.try { die "screaming"; } catch { /screaming/ and print "Stop screaming.\n"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error Checking: Have you tried 'Try/Catch'?
by mirod (Canon) on Feb 20, 2001 at 12:22 UTC | |
|
Re: Error Checking: Have you tried 'Try/Catch'?
by brother ab (Scribe) on Feb 20, 2001 at 16:57 UTC | |
|
Re: Error Checking: Have you tried 'Try/Catch'?
by BrentDax (Hermit) on Feb 20, 2001 at 14:31 UTC | |
by tadman (Prior) on Feb 20, 2001 at 15:02 UTC | |
|
Re: Error Checking: Have you tried 'Try/Catch'?
by PsychoSpunk (Hermit) on Feb 20, 2001 at 11:56 UTC |