On 15 March 2015 at 21:41, Manfred Lotz <[email protected]> wrote:
> I agree but I thought that in this case I would need to know the
> potential warning messages the :encoding(UTF-8) could issue in order to
> take action in those particular cases.
>
> Using a section local
> {
> open( local *STDERR,'>', $err);
> ...
> }
>
> gives me more control.
>
>
Eh? I don't understand. Localising $SIG{__WARN__} here and then doing
nothing doesn't require you to know the content of the warning to expect,
it merely captures *all* warnings.
( You can do something or not with them, doesn't matter )
Surely, you've used it before successfully, so we are probably having some
kind of communication error =).
$ perl -E '$SIG{__WARN__} = sub { }; warn q[ this is the warning ]'
$
You *can* add specific behaviour if you want to, but there's no requirement.
--
Kent
*KENTNL* - https://metacpan.org/author/KENTNL