in reply to Re^2: Capturing errors from 3-arg pipe open in ActivePerl 5.020
in thread [SOLVED] Capturing errors from 3-arg pipe open in ActivePerl 5.020

...eval block to catch this, but I was wondering if there was a better way.
From the XML::Twig docs:

safe_parse ( SOURCE [, OPT => OPT_VALUE ...])

This method is similar to parse except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig). $@ contains the error message on failure.

Note that the parsing still stops as soon as an error is detected, there is no way to keep going after an error.

        “The sources of quotes found on the internet are not always reliable.” — Abraham Lincoln.3; cf.

  • Comment on Re^3: Capturing errors from 3-arg pipe open in ActivePerl 5.020

Replies are listed 'Best First'.
Re^4: Capturing errors from 3-arg pipe open in ActivePerl 5.020
by ateague (Monk) on Nov 16, 2015 at 20:14 UTC

    Thank you for that tip.