Oh "try"! I like that! But is CATCH implemented in pugs? Anyone care
to give a working example of try/CATCH?

--michael

On 25/05/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
To complement string eval with eval { } (now called try):

        try {
                die "foo";
        } or say "error: $!"

On Thu, May 25, 2006 at 01:08:42 +0100, Michael Mathews wrote:
> This works...
>
>  #!/usr/bin/pugs
>  my $code = "sqawk(";
>  eval $code or say $!;
>  say "but still running.";
>
> it prints out...
>  unexpected end of input
>  expecting comment, ":", identifier, term or ")"
>  but still running.

> >On Wed, May 24, 2006 at 19:54:53 +0300, Gabor Szabo wrote:
> >> if eval "command" fails, where can I get the error message ?
> >>
> >> aka  $@ in P5 ?
> >
> >$!

Reply via email to